Skip to content

Commit

Permalink
Switch to DynamoDB API interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbaillie committed Oct 11, 2018
1 parent fec9e14 commit 562fe6b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions stream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@ import (
"errors"
"time"

"sync"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface"
"github.com/aws/aws-sdk-go/service/dynamodbstreams"
"sync"
"github.com/aws/aws-sdk-go/service/dynamodbstreams/dynamodbstreamsiface"
)

type StreamSubscriber struct {
dynamoSvc *dynamodb.DynamoDB
streamSvc *dynamodbstreams.DynamoDBStreams
dynamoSvc dynamodbiface.DynamoDBAPI
streamSvc dynamodbstreamsiface.DynamoDBStreamsAPI
table *string
ShardIteratorType *string
Limit *int64
}

func NewStreamSubscriber(
dynamoSvc *dynamodb.DynamoDB,
streamSvc *dynamodbstreams.DynamoDBStreams,
dynamoSvc dynamodbiface.DynamoDBAPI,
streamSvc dynamodbstreamsiface.DynamoDBStreamsAPI,
table string) *StreamSubscriber {
s := &StreamSubscriber{dynamoSvc: dynamoSvc, streamSvc: streamSvc, table: &table}
s.applyDefaults()
Expand Down

0 comments on commit 562fe6b

Please sign in to comment.