state

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilSetValue                   = errors.New("an attempt to set a nil value was received, try to use Delete instead")
	ErrRespNil                       = errors.New("the response for GetRequest is nil")
	ErrTransactOperationNotSupported = errors.New("transact operation not supported")
)

Functions

func GetModifiedStateKey added in v1.0.0

func GetModifiedStateKey(key, storeName, appID string) (string, error)

func GetOriginalStateKey added in v1.0.0

func GetOriginalStateKey(modifiedStateKey string) string

func NewGRPCStateStore added in v1.9.0

func NewGRPCStateStore(l logger.Logger, socket string) *grpcStateStore

NewGRPCStateStore creates a new grpc state store using the given socket factory.

func SaveStateConfiguration added in v1.0.0

func SaveStateConfiguration(storeName string, metadata map[string]string) error

Types

type Registry

type Registry struct {
	Logger logger.Logger
	// contains filtered or unexported fields
}

Registry is an interface for a component that returns registered state store implementations.

var DefaultRegistry *Registry = NewRegistry()

DefaultRegistry is the singleton with the registry.

func NewRegistry added in v0.4.0

func NewRegistry() *Registry

NewRegistry is used to create state store registry.

func (*Registry) Create added in v1.0.0

func (s *Registry) Create(name, version string) (state.Store, error)

func (*Registry) RegisterComponent added in v1.9.0

func (s *Registry) RegisterComponent(componentFactory func(logger.Logger) state.Store, names ...string)

RegisterComponent adds a new state store to the registry.

type StoreConfiguration added in v1.0.0

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

Jump to

Keyboard shortcuts

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