dynamodbstreams

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 14 Imported by: 0

README

DynamoDB Streams

Parity grade: B · SDK aws-sdk-go-v2/service/dynamodbstreams@v1.35.0 · last audited 2026-07-11 (95ab0584)

Coverage

Metric Value
Operations audited 4 (4 ok)
Feature families 4 (4 ok)
Known gaps 2
Deferred items 1
Resource leaks clean
Known gaps
  • DescribeStreamInput.ShardFilter (CHILD_SHARDS filtering) is accepted on the wire but ignored by the backend (services/dynamodb/streams_ops.go DescribeStream never reads input.ShardFilter) -- cross-service, backend lives in services/dynamodb, not editable from this service (bd: file follow-up)
  • services/dynamodb/streams_wire.go duplicates the wire-marshaling helpers in this package's handler.go (toWireDescribeStreamOutput, wireStreamDescription, wireGetRecordsOutput, wireStreamRecord, fromStreamItem, fromStreamAttributeValue) nearly verbatim, used by services/dynamodb/handler.go's own internal stream-passthrough endpoints -- cross-service duplication/reuse opportunity, not editable from this service (bd: file follow-up)
Deferred
  • none (all 4 routed ops fully audited this pass)

More

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Streams       ddbbackend.StreamsBackend
	DefaultRegion string
}

Handler handles HTTP requests for DynamoDB Streams operations.

Handler intentionally owns no independent state and therefore does not implement the Snapshot/Restore persistable shape that cli.go's setupPersistence auto-registers. Streams is wired (in cli.go's wireDynamoDBStreams) directly to the DynamoDB service's *InMemoryDB backend, which already persists everything durable about streams -- StreamARN, StreamsEnabled, StreamViewType, StreamCreatedAt, and the StreamRecords ring buffer -- as part of each Table in its own snapshot/restore (see services/dynamodb/persistence.go). Implementing Snapshot/Restore here would register a second "DynamoDBStreams" entry that duplicates and re-restores that same shared backend object. Shard iterators (GetShardIterator) are genuinely ephemeral request-scoped tokens with a short TTL in real AWS too, so not persisting them matches AWS behavior rather than being a gap. See persistence_test.go for the guard test on this invariant.

func NewHandler

func NewHandler(backend ddbbackend.StreamsBackend) *Handler

NewHandler creates a new DynamoDB Streams handler with the given backend.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this DynamoDB Streams handler handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the DynamoDB Streams operation from the X-Amz-Target header.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource extracts the stream ARN from the DynamoDB Streams request body.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the list of supported DynamoDB Streams operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function for DynamoDB Streams requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service identifier.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a matcher for DynamoDB Streams requests (by X-Amz-Target header).

type Provider

type Provider struct{}

Provider implements service.Provider for DynamoDB Streams.

func (*Provider) Init

Init initializes the DynamoDB Streams handler with a nil backend. The backend is wired later in cli.go via wireDynamoDBStreams().

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL