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
- func EnsureDatabase(db *bolt.DB) error
- func NewBatchedProtosessionsIOBackend(db *bolt.DB, encoder encoding.EncoderFunc, decoder encoding.DecoderFunc) (protosessions.BatchedIOBackend, error)
- func NewBoltKV(dbPath string) (storage.KV, error)
- func NewBoltSet(dbPath string) (storage.Set, error)
- func NewConsumer(ctx context.Context, b *bolt.DB, messageFormat worker.MessageFormat) worker.Consumer
- func NewPublisher(b *bolt.DB, messageFormat worker.MessageFormat) worker.Publisher
- func ParseNano(tasksKey string) (int64, error)
- func TasksCurrentNanosecondTs() string
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 ¶
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 NewBoltSet ¶
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 ¶
NewPublisher creates a new Bolt publisher instance.
func TasksCurrentNanosecondTs ¶
func TasksCurrentNanosecondTs() string
TasksCurrentNanosecondTs returns a key for the current timestamp.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.