memory

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateStore

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

StateStore keep in memory every durable state actor NOTE: NOT RECOMMENDED FOR PRODUCTION CODE because all records are in memory and there is no durability. This is recommended for tests or PoC

func NewStateStore

func NewStateStore() *StateStore

NewStateStore creates an instance StateStore

func (*StateStore) Connect

func (d *StateStore) Connect(ctx context.Context) error

Connect connects the durable store nolint

func (*StateStore) Disconnect

func (d *StateStore) Disconnect(ctx context.Context) error

Disconnect disconnect the durable store nolint

func (*StateStore) GetLatestState

func (d *StateStore) GetLatestState(ctx context.Context, persistenceID string) (*egopb.DurableState, error)

GetLatestState fetches the latest durable state nolint

func (*StateStore) Ping

func (d *StateStore) Ping(ctx context.Context) error

Ping verifies a connection to the database is still alive, establishing a connection if necessary.

func (*StateStore) WriteState

func (d *StateStore) WriteState(ctx context.Context, state *egopb.DurableState) error

WriteState persist durable state for a given persistenceID. nolint

Jump to

Keyboard shortcuts

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