File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,24 @@ func NewDynamoDBClient(params DynamoConnectionParams) *DynamoClient {
3636 }
3737 svc := dynamodb .New (session .New (), & config )
3838 //svc.Handlers.Retry.PushFrontNamed(CheckThrottleHandler)
39+
3940 return & DynamoClient {
4041 svc ,
41- params .TableDescriptions ,
42+ scopedTabledDescriptions ( params .TableDescriptions , params . Scope ) ,
4243 params .ServiceName ,
4344 }
4445}
4546
47+ func scopedTabledDescriptions (tds map [string ]* dynamodb.TableDescription , scope string ) map [string ]* dynamodb.TableDescription {
48+ scopedTds := make (map [string ]* dynamodb.TableDescription , len (tds ))
49+ for name , td := range tds {
50+ newTd := * td
51+ newTd .TableName = aws .String (fmt .Sprintf ("%s_%s" , scope , name ))
52+ scopedTds [name ] = & newTd
53+ }
54+ return scopedTds
55+ }
56+
4657type DynamoKey struct {
4758 HashKey string
4859 RangeKey string
You can’t perform that action at this time.
0 commit comments