Documentation ¶
Index ¶
- Constants
- type MDBXBackend
- func (b *MDBXBackend) Close()
- func (b *MDBXBackend) CountEvents(ctx context.Context, filter nostr.Filter) (int64, error)
- func (b *MDBXBackend) CountEventsHLL(ctx context.Context, filter nostr.Filter, offset int) (int64, *hyperloglog.HyperLogLog, error)
- func (b *MDBXBackend) DeleteEvent(ctx context.Context, evt *nostr.Event) error
- func (b *MDBXBackend) Init() error
- func (b *MDBXBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
- func (b *MDBXBackend) ReplaceEvent(ctx context.Context, evt *nostr.Event) error
- func (b *MDBXBackend) SaveEvent(ctx context.Context, evt *nostr.Event) error
- func (b *MDBXBackend) Serial() []byte
Constants ¶
View Source
const (
DB_VERSION byte = 'v'
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MDBXBackend ¶
type MDBXBackend struct { Path string MaxLimit int MaxLimitNegentropy int MapSize int64 EnableHLLCacheFor func(kind int) (useCache bool, skipSavingActualEvent bool) // contains filtered or unexported fields }
func (*MDBXBackend) Close ¶
func (b *MDBXBackend) Close()
func (*MDBXBackend) CountEvents ¶
func (b *MDBXBackend) CountEvents(ctx context.Context, filter nostr.Filter) (int64, error)
func (*MDBXBackend) CountEventsHLL ¶
func (b *MDBXBackend) CountEventsHLL(ctx context.Context, filter nostr.Filter, offset int) (int64, *hyperloglog.HyperLogLog, error)
CountEventsHLL is like CountEvents, but it will build a hyperloglog value while iterating through results, following NIP-45
func (*MDBXBackend) DeleteEvent ¶
func (b *MDBXBackend) DeleteEvent(ctx context.Context, evt *nostr.Event) error
func (*MDBXBackend) Init ¶
func (b *MDBXBackend) Init() error
func (*MDBXBackend) QueryEvents ¶
func (b *MDBXBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
func (*MDBXBackend) ReplaceEvent ¶
func (b *MDBXBackend) ReplaceEvent(ctx context.Context, evt *nostr.Event) error
func (*MDBXBackend) SaveEvent ¶
func (b *MDBXBackend) SaveEvent(ctx context.Context, evt *nostr.Event) error
func (*MDBXBackend) Serial ¶
func (b *MDBXBackend) Serial() []byte
Click to show internal directories.
Click to hide internal directories.