Documentation
¶
Index ¶
- type Backend
- func (b *Backend) Close() (err error)
- func (b *Backend) CountEvents(c context.T, f *filter.T) (count int, approx bool, err error)
- func (b *Backend) DeleteEvent(c context.T, ev *eventid.T, noTombstone ...bool) (err error)
- func (b *Backend) Export(c context.T, w io.Writer, pubkeys ...[]byte)
- func (b *Backend) Import(r io.Reader)
- func (b *Backend) Init(path string) (err error)
- func (b *Backend) Nuke() (err error)
- func (b *Backend) Path() (s string)
- func (b *Backend) QueryEvents(c context.T, f *filter.T) (evs event.Ts, err error)
- func (b *Backend) SaveEvent(c context.T, ev *event.T) (err error)
- func (b *Backend) Sync() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { Ctx context.T WG *sync.WaitGroup // L1 will store its state/configuration in path/layer1 L1 store.I // L2 will store its state/configuration in path/layer2 L2 store.I // PollFrequency is how often the L2 is queried for recent events. This is only // relevant for shared layer2 stores, and will not apply for layer2 // implementations that are just two separate data store systems on the same // server. PollFrequency time.Duration // PollOverlap is the multiple of the PollFrequency within which polling the L2 // is done to ensure any slow synchrony on the L2 is covered (2-4 usually). PollOverlap int // EventSignal triggers when the L1 saves a new event from the L2 // // caller is responsible for populating this so that a signal can pass to all // peers sharing the same L2 and enable cross-cluster subscription delivery. EventSignal event.C // contains filtered or unexported fields }
func (*Backend) CountEvents ¶
func (*Backend) DeleteEvent ¶
func (*Backend) QueryEvents ¶
Click to show internal directories.
Click to hide internal directories.