Documentation ¶
Index ¶
- func Using(provider Provider) func(next actor.ReceiverFunc) actor.ReceiverFunc
- type InMemoryProvider
- func (provider *InMemoryProvider) GetEvents(actorName string, eventIndexStart int, callback func(e interface{}))
- func (provider *InMemoryProvider) GetSnapshot(actorName string) (snapshot interface{}, eventIndex int, ok bool)
- func (provider *InMemoryProvider) GetSnapshotInterval() int
- func (provider *InMemoryProvider) PersistEvent(actorName string, eventIndex int, event proto.Message)
- func (provider *InMemoryProvider) PersistSnapshot(actorName string, eventIndex int, snapshot proto.Message)
- func (provider *InMemoryProvider) Restart()
- type Mixin
- type OfferSnapshot
- type Provider
- type ProviderState
- type Replay
- type ReplayComplete
- type RequestSnapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Using ¶
func Using(provider Provider) func(next actor.ReceiverFunc) actor.ReceiverFunc
Types ¶
type InMemoryProvider ¶
type InMemoryProvider struct {
// contains filtered or unexported fields
}
func NewInMemoryProvider ¶
func NewInMemoryProvider(snapshotInterval int) *InMemoryProvider
func (*InMemoryProvider) GetEvents ¶
func (provider *InMemoryProvider) GetEvents(actorName string, eventIndexStart int, callback func(e interface{}))
func (*InMemoryProvider) GetSnapshot ¶
func (provider *InMemoryProvider) GetSnapshot(actorName string) (snapshot interface{}, eventIndex int, ok bool)
func (*InMemoryProvider) GetSnapshotInterval ¶
func (provider *InMemoryProvider) GetSnapshotInterval() int
func (*InMemoryProvider) PersistEvent ¶
func (provider *InMemoryProvider) PersistEvent(actorName string, eventIndex int, event proto.Message)
func (*InMemoryProvider) PersistSnapshot ¶
func (provider *InMemoryProvider) PersistSnapshot(actorName string, eventIndex int, snapshot proto.Message)
func (*InMemoryProvider) Restart ¶
func (provider *InMemoryProvider) Restart()
type Mixin ¶
type Mixin struct {
// contains filtered or unexported fields
}
func (*Mixin) PersistReceive ¶
func (*Mixin) PersistSnapshot ¶
func (*Mixin) Recovering ¶
type OfferSnapshot ¶
type OfferSnapshot struct {
Snapshot interface{}
}
type Provider ¶
type Provider interface {
GetState() ProviderState
}
Provider is the abstraction used for persistence
type ProviderState ¶
type ProviderState interface { Restart() GetSnapshotInterval() int GetSnapshot(actorName string) (snapshot interface{}, eventIndex int, ok bool) GetEvents(actorName string, eventIndexStart int, callback func(e interface{})) PersistEvent(actorName string, eventIndex int, event proto.Message) PersistSnapshot(actorName string, eventIndex int, snapshot proto.Message) }
type ReplayComplete ¶
type ReplayComplete struct{}
type RequestSnapshot ¶
type RequestSnapshot struct{}
Click to show internal directories.
Click to hide internal directories.