Documentation ¶
Index ¶
- type DynamoDurableStore
- func (DynamoDurableStore) Connect(_ context.Context) error
- func (DynamoDurableStore) Disconnect(_ context.Context) error
- func (s DynamoDurableStore) GetLatestState(ctx context.Context, persistenceID string) (*egopb.DurableState, error)
- func (DynamoDurableStore) Ping(_ context.Context) error
- func (s DynamoDurableStore) WriteState(ctx context.Context, state *egopb.DurableState) error
- type TestContainer
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 ¶
func (DynamoDurableStore) Connect(_ context.Context) error
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 ¶
func (DynamoDurableStore) Ping(_ context.Context) error
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 (TestContainer) GetDdbClient ¶
func (c TestContainer) GetDdbClient(ctx context.Context) *dynamodb.Client
func (TestContainer) GetDurableStore ¶
func (c TestContainer) GetDurableStore() *DynamoDurableStore
Click to show internal directories.
Click to hide internal directories.