Documentation ¶
Index ¶
- Variables
- func WithPartitionkey(partitionKey string) func(o *Options)
- func WithScanParallelism(n int) func(o *Options)
- func WithSortKey(sortKey string) func(o *Options)
- func WithStronglyConsistentReads() func(o *Options)
- type DDBDatastore
- func (d *DDBDatastore) Batch(_ context.Context) (datastore.Batch, error)
- func (d *DDBDatastore) Close() error
- func (d *DDBDatastore) Delete(ctx context.Context, key ds.Key) error
- func (d *DDBDatastore) DiskUsage(ctx context.Context) (uint64, error)
- func (d *DDBDatastore) EntryCount(ctx context.Context) (uint64, error)
- func (d *DDBDatastore) Get(ctx context.Context, key ds.Key) ([]byte, error)
- func (d *DDBDatastore) GetExpiration(ctx context.Context, key ds.Key) (time.Time, error)
- func (d *DDBDatastore) GetSize(ctx context.Context, key ds.Key) (size int, err error)
- func (d *DDBDatastore) Has(ctx context.Context, key ds.Key) (bool, error)
- func (d *DDBDatastore) Put(ctx context.Context, key ds.Key, value []byte) error
- func (d *DDBDatastore) PutWithTTL(ctx context.Context, key ds.Key, value []byte, ttl time.Duration) error
- func (d *DDBDatastore) Query(ctx context.Context, q query.Query) (query.Results, error)
- func (d *DDBDatastore) SetTTL(ctx context.Context, key ds.Key, ttl time.Duration) error
- func (d *DDBDatastore) Sync(ctx context.Context, prefix ds.Key) error
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidKey = errors.New("invalid key for DynamoDB datastore")
)
Functions ¶
func WithPartitionkey ¶
func WithScanParallelism ¶
func WithSortKey ¶
func WithStronglyConsistentReads ¶
func WithStronglyConsistentReads() func(o *Options)
Types ¶
type DDBDatastore ¶
type DDBDatastore struct {
// contains filtered or unexported fields
}
func New ¶
func New(ddbClient *dynamodb.DynamoDB, table string, optFns ...func(o *Options)) *DDBDatastore
func (*DDBDatastore) Batch ¶
func (d *DDBDatastore) Batch(_ context.Context) (datastore.Batch, error)
func (*DDBDatastore) Close ¶
func (d *DDBDatastore) Close() error
func (*DDBDatastore) DiskUsage ¶
func (d *DDBDatastore) DiskUsage(ctx context.Context) (uint64, error)
DiskUsage returns the size of the DynamoDB table. Note that DynamoDB only updates this size once every few hours. The underlying call is heavily throttled so this should only be called occasionally.
func (*DDBDatastore) EntryCount ¶
func (d *DDBDatastore) EntryCount(ctx context.Context) (uint64, error)
func (*DDBDatastore) GetExpiration ¶
func (*DDBDatastore) PutWithTTL ¶
Click to show internal directories.
Click to hide internal directories.