state

package
v0.0.0-...-2a7ec10 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None   = ChangeKind("")
	Add    = ChangeKind("upsert")
	Update = ChangeKind("upsert")
	Remove = ChangeKind("delete")
)

Variables

This section is empty.

Functions

func NewActorStateManager deprecated

func NewActorStateManager(actorTypeName string, actorID string, provider *DaprStateAsyncProvider) actor.StateManager

Deprecated: use NewActorStateManagerContext instead.

func NewActorStateManagerContext

func NewActorStateManagerContext(actorTypeName string, actorID string, provider *DaprStateAsyncProvider) actor.StateManagerContext

Types

type ActorStateChange

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

func NewActorStateChange

func NewActorStateChange(stateName string, value any, changeKind ChangeKind, ttl *time.Duration) *ActorStateChange

type ChangeKind

type ChangeKind string

type ChangeMetadata

type ChangeMetadata struct {
	Kind  ChangeKind
	Value any
	TTL   *time.Duration
}

func NewChangeMetadata

func NewChangeMetadata(kind ChangeKind, value any) *ChangeMetadata

func (*ChangeMetadata) WithTTL

func (c *ChangeMetadata) WithTTL(ttl time.Duration) *ChangeMetadata

type DaprStateAsyncProvider

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

func NewDaprStateAsyncProvider

func NewDaprStateAsyncProvider(daprClient client.Client) *DaprStateAsyncProvider

TODO(@laurence) the daprClient may be nil.

func (*DaprStateAsyncProvider) Apply deprecated

func (d *DaprStateAsyncProvider) Apply(actorType, actorID string, changes []*ActorStateChange) error

Deprecated: use ApplyContext instead.

func (*DaprStateAsyncProvider) ApplyContext

func (d *DaprStateAsyncProvider) ApplyContext(ctx context.Context, actorType, actorID string, changes []*ActorStateChange) error

func (*DaprStateAsyncProvider) Contains deprecated

func (d *DaprStateAsyncProvider) Contains(actorType string, actorID string, stateName string) (bool, error)

Deprecated: use ContainsContext instead.

func (*DaprStateAsyncProvider) ContainsContext

func (d *DaprStateAsyncProvider) ContainsContext(ctx context.Context, actorType string, actorID string, stateName string) (bool, error)

func (*DaprStateAsyncProvider) Load deprecated

func (d *DaprStateAsyncProvider) Load(actorType, actorID, stateName string, reply interface{}) error

Deprecated: use LoadContext instead.

func (*DaprStateAsyncProvider) LoadContext

func (d *DaprStateAsyncProvider) LoadContext(ctx context.Context, actorType, actorID, stateName string, reply interface{}) error

Jump to

Keyboard shortcuts

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