Documentation ¶
Index ¶
- Variables
- func GetModifiedStateKey(key, storeName, appID string) (string, error)
- func GetOriginalStateKey(modifiedStateKey string) string
- func NewGRPCStateStore(l logger.Logger, socket string) *grpcStateStore
- func PerformBulkStoreOperation[T stateRequestConstraint](ctx context.Context, reqs []T, policyDef *resiliency.PolicyDefinition, ...) error
- func SaveStateConfiguration(storeName string, metadata map[string]string) error
- type Registry
- type StoreConfiguration
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") )
View Source
var ( GRPCCodeETagMismatch = codes.FailedPrecondition GRPCCodeETagInvalid = codes.InvalidArgument GRPCCodeBulkDeleteRowMismatch = codes.Internal )
errors code
Functions ¶
func GetModifiedStateKey ¶
func GetOriginalStateKey ¶
func NewGRPCStateStore ¶
NewGRPCStateStore creates a new grpc state store using the given socket factory.
func PerformBulkStoreOperation ¶
func PerformBulkStoreOperation[T stateRequestConstraint]( ctx context.Context, reqs []T, policyDef *resiliency.PolicyDefinition, opts state.BulkStoreOpts, execSingle func(ctx context.Context, req *T) error, execMulti func(ctx context.Context, reqs []T, opts state.BulkStoreOpts) error, ) error
PerformBulkStoreOperation performs a bulk set or delete using resiliency, retrying operations that fail only when they can be retried.
Types ¶
type Registry ¶
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 (*Registry) RegisterComponent ¶
func (s *Registry) RegisterComponent(componentFactory func(logger.Logger) state.Store, names ...string)
RegisterComponent adds a new state store to the registry.
func (*Registry) RegisterComponentWithVersions ¶
func (s *Registry) RegisterComponentWithVersions(name string, versions components.Versioning)
RegisterComponent adds a new state store to the registry.
type StoreConfiguration ¶
type StoreConfiguration struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.