Help us shape the future of Go! Take the 2026 Go Developer Survey

state

package
v1.16.21 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTransactionsTooManyOperations = errors.New("the transaction contains more operations than supported by the state store")

Functions

This section is empty.

Types

type Backend

type Backend interface {
	contribstate.Store
	contribstate.TransactionalStore
}

type Interface

type Interface interface {
	// Get retrieves actor state.
	Get(ctx context.Context, req *api.GetStateRequest, lock bool) (*api.StateResponse, error)

	// GetBulk retrieves actor state in bulk.
	GetBulk(ctx context.Context, req *api.GetBulkStateRequest, lock bool) (api.BulkStateResponse, error)

	// TransactionalStateOperation performs a transactional state operation with the actor state store.
	TransactionalStateOperation(ctx context.Context, ignoreHosted bool, req *api.TransactionalRequest, lock bool) error
}

func New

func New(opts Options) Interface

type Options

type Options struct {
	AppID      string
	StoreName  string
	CompStore  *compstore.ComponentStore
	Resiliency resiliency.Provider
	Table      table.Interface
	Placement  placement.Interface

	// TODO: @joshvanl Remove in Dapr 1.12 when ActorStateTTL is finalized.
	StateTTLEnabled bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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