Documentation ¶
Index ¶
- type StateStore
- func (d *StateStore) Connect(ctx context.Context) error
- func (d *StateStore) Disconnect(ctx context.Context) error
- func (d *StateStore) GetLatestState(ctx context.Context, persistenceID string) (*egopb.DurableState, error)
- func (d *StateStore) Ping(ctx context.Context) error
- func (d *StateStore) WriteState(ctx context.Context, state *egopb.DurableState) error
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 (*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
Click to show internal directories.
Click to hide internal directories.