Documentation
¶
Overview ¶
Package dynamodbstreams implements the AWS DynamoDB Streams API emulator. It reads stream data produced by the dynamodb service and exposes it via the DynamoDBStreams_20120810 target prefix on the shared POST / endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoDBService ¶
type DynamoDBService interface {
ListStreamEnabledTables(ctx context.Context) ([]*dynamodb.Table, error)
GetStreamTable(ctx context.Context, streamArn string) (*dynamodb.Table, error)
GetStreamRecordsSince(ctx context.Context, tableName string, afterSeq int64, limit int) ([]*dynamodb.StreamRecord, int64, error)
}
DynamoDBService is the narrow interface the streams service needs from the DynamoDB service. *dynamodb.Service satisfies this automatically.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements router.Service for DynamoDB Streams.
func New ¶
func New(ddb DynamoDBService, logger *zap.Logger) *Service
New returns a configured DynamoDB Streams Service.
func (*Service) Dispatch ¶
func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)
Dispatch routes to the correct handler based on X-Amz-Target.
func (*Service) Operations ¶
Operations implements router.ProtocolService.
func (*Service) RegisterRoutes ¶
RegisterRoutes is a no-op - DynamoDB Streams uses POST / via target dispatch.
func (*Service) SupportedProtocols ¶
SupportedProtocols implements router.ProtocolService.
func (*Service) TargetPrefix ¶
TargetPrefix returns the X-Amz-Target prefix for DynamoDB Streams dispatch.