Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit func() error
Commit drops a logged event once its operation has succeeded.
type EventHandler ¶
type Hydro ¶
type Hydro struct {
// contains filtered or unexported fields
}
Hydro journals events into the eru store, under the prefix of this instance's service address.
func (*Hydro) Register ¶
func (h *Hydro) Register(handler EventHandler)
type HydroEvent ¶
HydroEvent is one journal entry: what happened and the handler's own payload.
func NewHydroEvent ¶
func NewHydroEvent(typ string, item []byte) *HydroEvent
func (HydroEvent) Encode ¶
func (e HydroEvent) Encode() ([]byte, error)
type Store ¶ added in v0.1.1
type Store interface {
Put(ctx context.Context, data map[string]string) error
Delete(ctx context.Context, keys []string) error
GetPrefix(ctx context.Context, prefix string, limit int64) (map[string]string, error)
ListPrefix(ctx context.Context, prefix string) ([]string, error)
CreateLock(key string, ttl time.Duration) (lock.DistributedLock, error)
}
Store is the part of the eru store a journal writes through.
Click to show internal directories.
Click to hide internal directories.