Documentation ¶
Overview ¶
Package dynamodblogstore contains the resources required to create a DynamoDB log store.
Index ¶
- Constants
- type LogStore
- func (ls LogStore) Client() any
- func (ls LogStore) ExpirationDelaySeconds() uint64
- func (ls *LogStore) Get(tablePath storage.Path, fileName storage.Path) (*logstore.CommitEntry, error)
- func (ls *LogStore) Latest(tablePath storage.Path) (*logstore.CommitEntry, error)
- func (ls LogStore) MaxRetryTableCreateAttempts() uint16
- func (ls *LogStore) Put(entry *logstore.CommitEntry, overwrite bool) error
- func (ls LogStore) TableName() string
- type Options
Constants ¶
const ( // TablePath is the DynamoDB table attribute representing table path. TablePath attribute = "tablePath" // FileName is the DynamoDB table attribute representing file name. FileName attribute = "fileName" // TempPath is the DynamoDB table attribute representing temp path. TempPath attribute = "tempPath" // Complete is the DynamoDB table attribute representing transaction completeness. Complete attribute = "complete" // ExpireTime is the DynamoDB table attribute representing expire time. ExpireTime attribute = "expireTime" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogStore ¶
type LogStore struct {
// contains filtered or unexported fields
}
LogStore uses a DynamoDB table to provide mutual exclusion during calls to `Put`.
DynamoDB entries are of the form - key -- tablePath (HASH, STRING) -- fileName (RANGE, STRING)
- attributes -- tempPath (STRING, relative to the Delta log) -- complete (STRING, representing boolean, "true" or "false") -- expireTime (NUMBER, epoch seconds)
func (LogStore) ExpirationDelaySeconds ¶
ExpirationDelaySeconds gets the number of seconds until a commit entry expires.
func (*LogStore) Get ¶
func (ls *LogStore) Get(tablePath storage.Path, fileName storage.Path) (*logstore.CommitEntry, error)
Get gets a commit entry corresponding to the commit log identified by the given table path and file name.
func (*LogStore) Latest ¶
Latest gets the commit entry corresponding to the latest commit log for a given table path.
func (LogStore) MaxRetryTableCreateAttempts ¶
MaxRetryTableCreateAttempts gets the maximum number of table creation attempts.
type Options ¶
type Options struct { Client dynamodbutils.Client TableName string ExpirationDelaySeconds uint64 MaxTableCreateAttempts uint16 // The number of read capacity units which can be consumed per second (https://aws.amazon.com/dynamodb/pricing/provisioned/). RCU int64 // The number of write capacity units which can be consumed per second (https://aws.amazon.com/dynamodb/pricing/provisioned/). WCU int64 }
Options contains settings that can be adjusted to change the behavior of LogStore.