Documentation ¶
Overview ¶
Package dynatomic provides a convenient wrapper API around using DynamoDB as highly available, concurrent, and performant asynchronous atomic counter
Basic usage:
// Initialize the dynatomic backround goroutine with a batch size of 100, // a wait time of a second, an AWS config and a function that will // notify the user of internal errors d := New(100, time.Second, config, errHandler) d.RowChan <- &types.Row{...} d.RowChan <- &types.Row{...} d.RowChan <- &types.Row{...} ... d.Done()
Dynamo will update accordingly For example if you write the rows:
Table: MyTable, Key: A, Range: A, Incr: 5 Table: MyTable, Key: A, Range: A, Incr: 5 Table: MyTable, Key: A, Range: A, Incr: 5 Table: MyTable, Key: A, Range: A, Incr: 5
Then MyTable Key A, Range A will now show a value of 20
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dynatomic ¶
type Dynatomic struct { RowChan chan *types.Row Config *aws.Config ErrHandler func(loc string, err error) BatchSize int WaitTime time.Duration // contains filtered or unexported fields }
Dynatomic struct contains all information necessary to perform bulk, asynchronous writes
Click to show internal directories.
Click to hide internal directories.