Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynoStream ¶
type DynoStream struct {
// contains filtered or unexported fields
}
DynoStream is a struct that contains the DynamoDB and DynamoDBStreams interfaces as well as the name of the table to stream from.
func New ¶
func New(db dynamodbiface.DynamoDBAPI, dbStreams dynamodbstreamsiface.DynamoDBStreamsAPI, table string) *DynoStream
New creates a new DynoStream struct from existing DynamoDB and DynamoDBStreams interfaces and the name of the table to stream from.
func NewFromSession ¶
func NewFromSession(sess *session.Session, table string) *DynoStream
NewFromSession creates a new DynoStream struct from an existing AWS session and the name of the table to stream from.
func (*DynoStream) Subscribe ¶
func (ds *DynoStream) Subscribe(ctx context.Context) (<-chan *dynamodbstreams.Record, <-chan error)
Subscribe creates a new subscription to the DynamoDB stream for the table specified in the DynoStream struct. It returns a channel of dynamodbstreams.Record structs and a channel of errors. The dynamodbstreams.Record channel will be closed when the context is closed.