dynamostate

package
v0.0.0-...-963cbb1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package dynamostate contains the resources required to create a DynamoDB state store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute string

Attribute represents attribute names in DynamoDB items.

type DynamoState

type DynamoState struct {
	Table  string
	Key    string
	Client dynamodbutils.Client
}

DynamoState stores a table's commit state in DynamoDB.

func New

func New(client dynamodbutils.Client, tableName string, key string, opts Options) (*DynamoState, error)

New creates a new DynamoState instance.

func (*DynamoState) Get

func (l *DynamoState) Get() (state.CommitState, error)

Get retrieves a commit state from a DynamoDB state store.

func (*DynamoState) Put

func (l *DynamoState) Put(commitS state.CommitState) error

Put adds a commit state to a DynamoDB state store.

type Options

type Options struct {
	MaxRetryTableCreateAttempts 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 a DynamoDB state store.

Jump to

Keyboard shortcuts

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