Skip to content

Commit 28006a2

Browse files
authored
Enable dynamodbstream (#84)
1 parent 6ac5794 commit 28006a2

File tree

4 files changed

+33
-29
lines changed

4 files changed

+33
-29
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
localstack:
3838
image: localstack/localstack:latest
3939
env:
40-
SERVICES: s3,dynamodb
40+
SERVICES: s3,dynamodb,dynamodbstreams
4141
DEFAULT_REGION: ap-northeast-1
4242
AWS_ACCESS_KEY_ID: dummy
4343
AWS_SECRET_ACCESS_KEY: dummy

docker-compose.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,30 @@ services:
6868
# depends_on:
6969
# - localstack
7070

71-
phalanx:
72-
container_name: phalanx
73-
image: mosuka/phalanx:latest
74-
environment:
75-
MINIO_ENDPOINT: minio:9000
76-
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
77-
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
78-
MINIO_REGION_NAME: ${MINIO_REGION_NAME}
79-
MINIO_SESSION_TOKEN: ${MINIO_SESSION_TOKEN}
80-
MINIO_SECURE: ${MINIO_SECURE}
81-
ETCD_ENDPOINTS: etcd:2379
82-
command:
83-
- '--host=phalanx'
84-
- '--bind-port=2000'
85-
- '--grpc-port=5000'
86-
- '--http-port=8000'
87-
- '--roles=indexer,searcher'
88-
- '--index-metastore-uri=etcd://phalanx/metastore'
89-
- '--log-level=info'
90-
ports:
91-
- "2000:2000"
92-
- "5000:5000"
93-
- "8000:8000"
94-
depends_on:
95-
- etcd
96-
- minio
97-
restart: always
71+
# phalanx:
72+
# container_name: phalanx
73+
# image: mosuka/phalanx:latest
74+
# environment:
75+
# MINIO_ENDPOINT: minio:9000
76+
# MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
77+
# MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
78+
# MINIO_REGION_NAME: ${MINIO_REGION_NAME}
79+
# MINIO_SESSION_TOKEN: ${MINIO_SESSION_TOKEN}
80+
# MINIO_SECURE: ${MINIO_SECURE}
81+
# ETCD_ENDPOINTS: etcd:2379
82+
# command:
83+
# - '--host=phalanx'
84+
# - '--bind-port=2000'
85+
# - '--grpc-port=5000'
86+
# - '--http-port=8000'
87+
# - '--roles=indexer,searcher'
88+
# - '--index-metastore-uri=etcd://phalanx/metastore'
89+
# - '--log-level=info'
90+
# ports:
91+
# - "2000:2000"
92+
# - "5000:5000"
93+
# - "8000:8000"
94+
# depends_on:
95+
# - etcd
96+
# - minio
97+
# restart: always

example.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ AWS_USE_PATH_STYLE=true
1818

1919
ETCD_ENDPOINTS=127.0.0.1:2379
2020

21-
LOCALSTACK_SERVICES=s3,dynamodb
21+
LOCALSTACK_SERVICES=s3,dynamodb,dynamodbstreams
2222
LOCALSTACK_DEFAULT_REGION=ap-northeast-1

metastore/storage_dynamodb.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ func (m *DynamodbStorage) createTable() error {
319319
},
320320
},
321321
BillingMode: types.BillingModePayPerRequest,
322+
StreamSpecification: &types.StreamSpecification{
323+
StreamEnabled: aws.Bool(true),
324+
StreamViewType: types.StreamViewTypeNewAndOldImages,
325+
},
322326
})
323327
if err != nil {
324328
var rne *types.ResourceInUseException

0 commit comments

Comments
 (0)