Documentation ¶
Index ¶
- Constants
- func NewActorStateManager(actorTypeName string, actorID string, provider *DaprStateAsyncProvider) actor.StateManagerdeprecated
- func NewActorStateManagerContext(actorTypeName string, actorID string, provider *DaprStateAsyncProvider) actor.StateManagerContext
- type ActorStateChange
- type ChangeKind
- type ChangeMetadata
- type DaprStateAsyncProvider
- func (d *DaprStateAsyncProvider) Apply(actorType, actorID string, changes []*ActorStateChange) errordeprecated
- func (d *DaprStateAsyncProvider) ApplyContext(ctx context.Context, actorType, actorID string, changes []*ActorStateChange) error
- func (d *DaprStateAsyncProvider) Contains(actorType string, actorID string, stateName string) (bool, error)deprecated
- func (d *DaprStateAsyncProvider) ContainsContext(ctx context.Context, actorType string, actorID string, stateName string) (bool, error)
- func (d *DaprStateAsyncProvider) Load(actorType, actorID, stateName string, reply interface{}) errordeprecated
- func (d *DaprStateAsyncProvider) LoadContext(ctx context.Context, actorType, actorID, stateName string, reply interface{}) error
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) ContainsContext ¶
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
Click to show internal directories.
Click to hide internal directories.