Documentation ¶
Index ¶
- func NewDiskSnapshotStore(basePath string) *diskSnapshotStore
- type AggregateTypeStats
- func (a *AggregateTypeStats) Accept(record *rangedb.Record)
- func (a *AggregateTypeStats) LatestGlobalSequenceNumber() uint64
- func (a *AggregateTypeStats) LoadFromSnapshot(r io.Reader) error
- func (a *AggregateTypeStats) SaveSnapshot(w io.Writer) error
- func (a *AggregateTypeStats) SnapshotName() string
- func (a *AggregateTypeStats) SortedAggregateTypes() []string
- func (a *AggregateTypeStats) TotalEvents() uint64
- func (a *AggregateTypeStats) TotalEventsByAggregateType(aggregateType string) uint64
- type SnapshotProjection
- type SnapshotStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDiskSnapshotStore ¶ added in v0.4.0
func NewDiskSnapshotStore(basePath string) *diskSnapshotStore
NewDiskSnapshotStore constructs a snapshot store that persists to disk.
Types ¶
type AggregateTypeStats ¶
type AggregateTypeStats struct {
// contains filtered or unexported fields
}
AggregateTypeStats contains data for this projection.
func NewAggregateTypeStats ¶
func NewAggregateTypeStats() *AggregateTypeStats
NewAggregateTypeStats constructs a projection for aggregate type statistics.
func (*AggregateTypeStats) Accept ¶
func (a *AggregateTypeStats) Accept(record *rangedb.Record)
Accept receives a Record.
func (*AggregateTypeStats) LatestGlobalSequenceNumber ¶ added in v0.4.0
func (a *AggregateTypeStats) LatestGlobalSequenceNumber() uint64
LatestGlobalSequenceNumber returns the global sequence number from the last received event.
func (*AggregateTypeStats) LoadFromSnapshot ¶ added in v0.4.0
func (a *AggregateTypeStats) LoadFromSnapshot(r io.Reader) error
LoadFromSnapshot reads the projection data from an io.Reader and loads the state.
func (*AggregateTypeStats) SaveSnapshot ¶ added in v0.4.0
func (a *AggregateTypeStats) SaveSnapshot(w io.Writer) error
SaveSnapshot writes the projection data to an io.Writer.
func (*AggregateTypeStats) SnapshotName ¶ added in v0.4.0
func (a *AggregateTypeStats) SnapshotName() string
SnapshotName returns the name for snapshot purposes.
func (*AggregateTypeStats) SortedAggregateTypes ¶
func (a *AggregateTypeStats) SortedAggregateTypes() []string
SortedAggregateTypes returns distinct aggregate types sorted by key.
func (*AggregateTypeStats) TotalEvents ¶ added in v0.4.0
func (a *AggregateTypeStats) TotalEvents() uint64
TotalEvents returns the total number of received events.
func (*AggregateTypeStats) TotalEventsByAggregateType ¶
func (a *AggregateTypeStats) TotalEventsByAggregateType(aggregateType string) uint64
TotalEventsByAggregateType returns the total number of received events by aggregate type.
type SnapshotProjection ¶ added in v0.4.0
type SnapshotProjection interface { SnapshotName() string SaveSnapshot(w io.Writer) error LoadFromSnapshot(r io.Reader) error }
SnapshotProjection defines the interface for loading/saving a projection snapshot.
type SnapshotStore ¶ added in v0.4.0
type SnapshotStore interface { Load(projection SnapshotProjection) error Save(projection SnapshotProjection) error }
SnapshotStore defines the interface for loading/saving a SnapshotProjection.