dynamodb

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package dynamodb is doze-aws's from-scratch DynamoDB: the full item model (arbitrary-precision numbers, sets, documents), real expression parsing (condition/filter/key-condition/update/projection), GSIs and LSIs maintained transactionally, Query/Scan with DynamoDB's paging semantics, conditional writes, batch operations, single-node TransactWriteItems/TransactGetItems with ClientRequestToken idempotency, and TTL enforced by a janitor.

PartiQL (ExecuteStatement/BatchExecuteStatement/ExecuteTransaction) and DynamoDB Streams (ListStreams/DescribeStream/GetShardIterator/GetRecords, with a single open shard) are supported; a stream drives a Lambda event-source mapping. Global tables, DAX, and backup/export are cloud infrastructure and answer honestly.

See docs/api-support/dynamodb.md for the operation-by-operation table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// DataDir holds the bbolt store (dynamodb.bolt). Required.
	DataDir string
	// Peers is accepted for constructor uniformity (streams would use it).
	Peers peers.Directory
	// Logf receives log lines; nil discards.
	Logf func(format string, args ...any)
	// Clock overrides time.Now in tests.
	Clock func() time.Time
}

Options configures the service.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the DynamoDB service: an http.Handler speaking AWS JSON 1.0, and an io.Closer that stops the janitor and closes the store.

func New

func New(opts Options) (*Server, error)

New opens the store under DataDir and starts the TTL janitor.

func (*Server) Close

func (s *Server) Close() error

Close stops the janitor and closes the bbolt DB.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) SweepTTLNow

func (s *Server) SweepTTLNow()

SweepTTLNow runs one TTL sweep immediately (tests).

Jump to

Keyboard shortcuts

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