Documentation ¶
Index ¶
- type Backend
- func (b *Backend) Close()
- func (b *Backend) CountEvents(c context.T, f *filter.T) (int64, error)
- func (b *Backend) DeleteEvent(c context.T, evt *event.T) (err error)
- func (b *Backend) Init(inf *relayinfo.T, params ...string) (err error)
- func (b *Backend) QueryEvents(c context.T, ch chan *event.T, f *filter.T) error
- func (b *Backend) SaveEvent(c context.T, evt *event.T) (err error)
- func (b *Backend) Serial() []byte
- type PriorityQueue
- type Queries
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { Path string MaxLimit int *badger.DB // contains filtered or unexported fields }
func (*Backend) CountEvents ¶
func (*Backend) QueryEvents ¶
type PriorityQueue ¶
type PriorityQueue struct {
Queries
}
func NewPriorityQueue ¶
func NewPriorityQueue(l int) *PriorityQueue
func (*PriorityQueue) Len ¶
func (pq *PriorityQueue) Len() int
func (*PriorityQueue) Less ¶
func (pq *PriorityQueue) Less(i, j int) bool
Less returns whether event i is newer (greater) than event j, reverse chronological order, the first result will be the newest.
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() any
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x any)
func (*PriorityQueue) Swap ¶
func (pq *PriorityQueue) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.