Documentation ¶
Index ¶
- type HandlerFunc
- type Offset
- type OffsetFinder
- type OffsetManager
- type OffsetSaver
- type Option
- func WithAutoCommit() Option
- func WithDebug(logFunc func(args ...interface{})) Option
- func WithGroupID(groupID string) Option
- func WithInitialOffsets(offsets ...Offset) Option
- func WithOffsetInterval(interval time.Duration) Option
- func WithOffsetManager(manager OffsetManager) Option
- func WithOffsetManagerDynamoDB(api dynamodbiface.DynamoDBAPI, tableName string) Option
- func WithPollInterval(pollInterval time.Duration) Option
- func WithTrace(printFunc func(args ...interface{})) Option
- type Options
- type Processor
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type HandlerFunc func(ctx context.Context, record *dynamodbstreams.StreamRecord) error
HandlerFunc wraps custom stream processing code
type OffsetFinder ¶
type OffsetManager ¶
type OffsetManager interface { OffsetSaver OffsetFinder }
type OffsetSaver ¶
type Option ¶
type Option func(*Options)
func WithAutoCommit ¶
func WithAutoCommit() Option
WithAutoCommit indicates offsets should be saved after each successful commit. Caution should be used when enabling this as streams with high traffic will generate a significant number of commits.
func WithDebug ¶
func WithDebug(logFunc func(args ...interface{})) Option
WithDebug indicates delay between polling requests on open (e.g. not complete) shards
func WithGroupID ¶
func WithInitialOffsets ¶
func WithOffsetInterval ¶
func WithOffsetManager ¶
func WithOffsetManager(manager OffsetManager) Option
func WithOffsetManagerDynamoDB ¶
func WithOffsetManagerDynamoDB(api dynamodbiface.DynamoDBAPI, tableName string) Option
func WithPollInterval ¶
WithPollInterval indicates delay between polling requests on open (e.g. not complete) shards
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func New ¶
func New(api dynamodbstreamsiface.DynamoDBStreamsAPI) *Processor
func (*Processor) Subscribe ¶
func (p *Processor) Subscribe(ctx context.Context, tableName string, h HandlerFunc, opts ...Option) (*Subscriber, error)
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber reference the subscription to the stream
func (*Subscriber) Close ¶
func (s *Subscriber) Close() error
Close the subscription, freeing any consumed resources
func (*Subscriber) Wait ¶
func (s *Subscriber) Wait() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.