bolt

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package bolt provides BoltDB storage operations for hit tracking.

Package bolt provides functionality for storing and retrieving data using BoltDB

Package bolt provides functionality for storing and retrieving data using BoltDB

Index

Constants

View Source
const TasksBucket = "tasks"

TasksBucket is the bucket name for hit data.

View Source
const TasksPrefix = "tasks/"

TasksPrefix is the prefix for hit-related keys.

Variables

This section is empty.

Functions

func EnsureDatabase

func EnsureDatabase(db *bolt.DB) error

EnsureDatabase creates required buckets if they don't exist.

func NewBatchedProtosessionsIOBackend added in v0.13.0

func NewBatchedProtosessionsIOBackend(
	db *bolt.DB,
	encoder encoding.EncoderFunc,
	decoder encoding.DecoderFunc,
) (protosessions.BatchedIOBackend, error)

NewBatchedProtosessionsIOBackend creates a BatchedIOBackend using BoltDB with single-transaction batching

func NewBoltKV

func NewBoltKV(dbPath string) (storage.KV, error)

NewBoltKV creates a new KV implementation using BoltDB

func NewBoltSet

func NewBoltSet(dbPath string) (storage.Set, error)

NewBoltSet creates a new Set implementation using BoltDB

func NewConsumer

func NewConsumer(ctx context.Context, b *bolt.DB, messageFormat worker.MessageFormat) worker.Consumer

NewConsumer creates a new consumer, using embedded BoltDB

func NewPublisher

func NewPublisher(b *bolt.DB, messageFormat worker.MessageFormat) worker.Publisher

NewPublisher creates a new Bolt publisher instance.

func ParseNano

func ParseNano(tasksKey string) (int64, error)

ParseNano extracts timestamp from a hits key.

func TasksCurrentNanosecondTs

func TasksCurrentNanosecondTs() string

TasksCurrentNanosecondTs returns a key for the current timestamp.

Types

This section is empty.

Jump to

Keyboard shortcuts

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