Documentation
¶
Index ¶
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) RouteMatcher() service.Matcher
- type Provider
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 ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this DynamoDB Streams handler handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the DynamoDB Streams operation from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts the stream ARN from the DynamoDB Streams request body.
func (*Handler) GetSupportedOperations ¶
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 ¶
MatchPriority returns the routing priority.
func (*Handler) RouteMatcher ¶
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 ¶
func (p *Provider) Init(_ *service.AppContext) (service.Registerable, error)
Init initializes the DynamoDB Streams handler with a nil backend. The backend is wired later in cli.go via wireDynamoDBStreams().