Documentation
¶
Overview ¶
Package dynamodb provides a persistence Driver backed by Amazon DynamoDB.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.18.0
type Config struct {
// AWS is the AWS configuration used to create the DynamoDB client.
AWS aws.Config
// ClientOptions are additional options applied to the DynamoDB client.
ClientOptions []func(*awsdynamodb.Options)
// TablePrefix is the prefix for DynamoDB table names. Each primitive uses a
// separate table ("<prefix>-journal", "<prefix>-kv", "<prefix>-set").
TablePrefix string
}
Config holds the configuration for a DynamoDB persistence driver.
func FromURL ¶ added in v0.18.0
FromURL returns a *Config for the given dynamodb:// *url.URL. See ParseURL for the URL format.
func ParseURL ¶ added in v0.18.0
ParseURL returns a *Config for the given dynamodb:// URL string.
URL format:
dynamodb:///<table-prefix> dynamodb://<host>:<port>/<table-prefix>
Supported query parameters:
- region: AWS region (e.g. "us-east-1"); if omitted, resolved from the environment
- role_arn: ARN of an IAM role to assume via STS
- insecure: use HTTP instead of HTTPS for a custom endpoint (requires a host)
type Driver ¶ added in v0.18.0
type Driver struct {
// contains filtered or unexported fields
}
Driver is a persistence driver backed by Amazon DynamoDB.
func New ¶ added in v0.18.0
func New(client *awsdynamodb.Client, tablePrefix string) *Driver
New returns a Driver that uses the given DynamoDB client and table prefix.
func (*Driver) Close ¶ added in v0.18.0
Close is a no-op. The DynamoDB client does not require explicit cleanup.
func (*Driver) JournalStore ¶ added in v0.18.0
func (d *Driver) JournalStore() journal.BinaryStore
JournalStore returns a journal store backed by DynamoDB.
func (*Driver) KVStore ¶ added in v0.18.0
func (d *Driver) KVStore() kv.BinaryStore
KVStore returns a key/value store backed by DynamoDB.
func (*Driver) SetStore ¶ added in v0.18.0
func (d *Driver) SetStore() set.BinaryStore
SetStore returns a set store backed by DynamoDB.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package dynamojournal provides an implementation of journal.BinaryStore that persists to a DynamoDB table.
|
Package dynamojournal provides an implementation of journal.BinaryStore that persists to a DynamoDB table. |
|
Package dynamokv provides a kv.BinaryStore implementation that persists to a DynamoDB table.
|
Package dynamokv provides a kv.BinaryStore implementation that persists to a DynamoDB table. |
|
Package dynamoset provides a set.BinaryStore implementation that persists to a DynamoDB table.
|
Package dynamoset provides a set.BinaryStore implementation that persists to a DynamoDB table. |