boltdb

package
v0.0.0-...-1c43f0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: Unlicense Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_VERSION byte = 'v'
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltBackend

type BoltBackend struct {
	Path    string
	MapSize int64
	DB      *bbolt.DB

	EnableHLLCacheFor func(kind nostr.Kind) (useCache bool, skipSavingActualEvent bool)
}

func (*BoltBackend) Close

func (b *BoltBackend) Close()

func (*BoltBackend) CountEvents

func (b *BoltBackend) CountEvents(filter nostr.Filter) (uint32, error)

func (*BoltBackend) CountEventsHLL

func (b *BoltBackend) CountEventsHLL(filter nostr.Filter, offset int) (uint32, *hyperloglog.HyperLogLog, error)

CountEventsHLL is like CountEvents, but it will build a hyperloglog value while iterating through results, following NIP-45

func (*BoltBackend) DeleteEvent

func (b *BoltBackend) DeleteEvent(id nostr.ID) error

func (*BoltBackend) Init

func (b *BoltBackend) Init() error

func (*BoltBackend) QueryEvents

func (b *BoltBackend) QueryEvents(filter nostr.Filter, maxLimit int) iter.Seq[nostr.Event]

func (*BoltBackend) ReplaceEvent

func (b *BoltBackend) ReplaceEvent(evt nostr.Event) error

func (*BoltBackend) SaveEvent

func (b *BoltBackend) SaveEvent(evt nostr.Event) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL