Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllProviderNames = []ProviderName{REDIS}
Functions ¶
This section is empty.
Types ¶
type CacheProvider ¶ added in v0.11.0
type CacheProvider interface { Get(ctx context.Context, ref *stategate.CacheRef) (*stategate.Cache, *errorz.Error) Set(ctx context.Context, value *stategate.Cache) *errorz.Error Del(ctx context.Context, value *stategate.CacheRef) *errorz.Error }
CacheProvider acts as dependency injection for caching ephemeral data
type ChannelProvider ¶ added in v0.11.0
type ChannelProvider interface { PublishEvent(ctx context.Context, event *stategate.Event) *errorz.Error GetEventChannel(ctx context.Context) (chan *stategate.Event, *errorz.Error) PublishMessage(ctx context.Context, message *stategate.PeerMessage) *errorz.Error GetMessageChannel(ctx context.Context) (chan *stategate.PeerMessage, *errorz.Error) }
ChannelProvider acts as dependency injection for broadcasting messages to stategate instances as they fan out
type MutexProvider ¶ added in v0.11.0
type MutexProvider interface { Lock(ctx context.Context, ref *stategate.Mutex) *errorz.Error Unlock(ctx context.Context, value *stategate.MutexRef) *errorz.Error }
MutexProvider acts as dependency injection for distributed mutex operations
type Provider ¶
type Provider interface { CacheProvider ChannelProvider MutexProvider Close() error }
Provider is a channel, cache, & mutex provider
Click to show internal directories.
Click to hide internal directories.