Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index - A badger prefix based indexer for NATS KV
func New ¶
func New(ctx context.Context, kv jetstream.KeyValue, options *IndexOptions, indexFn IndexFn) (*Index, error)
New creates a new instance of the indexer.
type IndexFn ¶
type IndexFn func(entry jetstream.KeyValueEntry) [][]byte
IndexFn takes a KeyValueEntry, and returns a set of badger keys.
type IndexOptions ¶
type IndexOptions struct { IndexToDisk bool // IndexToDisk creates an index on disk if true. Path string // Path on disk for the index files. This must be ephemeral, or externally deleted before calling Start(). WarmupDelay time.Duration // WarmupDelay is the time that the index waits before allowing queries. Ready func() // Ready function is called once the warmup delay has passed. }
IndexOptions holds configuration options for the indexing process.
Click to show internal directories.
Click to hide internal directories.