dynamodb

package module
v0.0.0-...-e03aee4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamoDurableStore

type DynamoDurableStore struct {
	// contains filtered or unexported fields
}

DynamoDurableStore implements the DurableStore interface and helps persist states in a DynamoDB

func NewDurableStore

func NewDurableStore(tableName string, client *dynamodb.Client) *DynamoDurableStore

func (DynamoDurableStore) Connect

Connect connects to the journal store No connection is needed because the client is stateless

func (DynamoDurableStore) Disconnect

func (DynamoDurableStore) Disconnect(_ context.Context) error

Disconnect disconnect the journal store There is no need to disconnect because the client is stateless

func (DynamoDurableStore) GetLatestState

func (s DynamoDurableStore) GetLatestState(ctx context.Context, persistenceID string) (*egopb.DurableState, error)

GetLatestState fetches the latest durable state

func (DynamoDurableStore) Ping

Ping verifies a connection to the database is still alive, establishing a connection if necessary. There is no need to ping because the client is stateless

func (DynamoDurableStore) WriteState

func (s DynamoDurableStore) WriteState(ctx context.Context, state *egopb.DurableState) error

WriteState persist durable state for a given persistenceID.

type TestContainer

type TestContainer struct {
	// contains filtered or unexported fields
}

func NewTestContainer

func NewTestContainer() *TestContainer

func (TestContainer) Cleanup

func (c TestContainer) Cleanup()

func (TestContainer) CreateTable

func (c TestContainer) CreateTable(ctx context.Context, tableName string, client *dynamodb.Client) error

func (TestContainer) GetDdbClient

func (c TestContainer) GetDdbClient(ctx context.Context) *dynamodb.Client

func (TestContainer) GetDurableStore

func (c TestContainer) GetDurableStore() *DynamoDurableStore

Jump to

Keyboard shortcuts

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