Documentation ¶
Index ¶
- func Using(provider Provider) func(next actor.ReceiverFunc) actor.ReceiverFunc
- type EventStore
- type InMemoryProvider
- func (provider *InMemoryProvider) DeleteEvents(actorName string, inclusiveToIndex int)
- func (provider *InMemoryProvider) DeleteSnapshots(actorName string, inclusiveToIndex int)
- func (provider *InMemoryProvider) GetEvents(actorName string, eventIndexStart int, eventIndexEnd int, ...)
- 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
- type SnapshotStore
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 EventStore ¶
type InMemoryProvider ¶
type InMemoryProvider struct {
// contains filtered or unexported fields
}
func NewInMemoryProvider ¶
func NewInMemoryProvider(snapshotInterval int) *InMemoryProvider
func (*InMemoryProvider) DeleteEvents ¶
func (provider *InMemoryProvider) DeleteEvents(actorName string, inclusiveToIndex int)
func (*InMemoryProvider) DeleteSnapshots ¶
func (provider *InMemoryProvider) DeleteSnapshots(actorName string, inclusiveToIndex int)
func (*InMemoryProvider) GetEvents ¶
func (provider *InMemoryProvider) GetEvents(actorName string, eventIndexStart int, eventIndexEnd 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 { SnapshotStore EventStore Restart() GetSnapshotInterval() int }
ProviderState is an object containing the implementation for the provider
type ReplayComplete ¶
type ReplayComplete struct{}
type RequestSnapshot ¶
type RequestSnapshot struct{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.