tokenlockdb

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StoreService

type StoreService struct{ driver.TokenLockStore }

func (*StoreService) Unwrap added in v0.26.0

func (s *StoreService) Unwrap() driver.TokenLockStore

Unwrap returns the driver store this service wraps, so a caller can discover an optional capability on the implementation itself.

This type embeds the driver.TokenLockStore *interface*, which promotes only that interface's method set: a capability a concrete driver offers beyond it - notably sherdlock.BatchLocker's LockBatch, which no driver interface declares because not every backend can batch - is invisible on *StoreService, so a type assertion against this wrapper silently reports the capability as absent. Callers that discover capabilities by assertion must therefore look through this method as well; see sherdlock.asBatchLocker.

It tolerates a nil receiver and reports no store: capability discovery probes whatever Locker it is handed, and a typed-nil *StoreService inside an otherwise non-nil interface is a value it can legitimately be given - sherdlock's rate-limiting path builds a selector with no lock store at all, because the limiter must deny a request before the selector reaches one.

type StoreServiceManager

type StoreServiceManager db.StoreServiceManager[*StoreService]

func NewStoreServiceManager

func NewStoreServiceManager(cp db.ConfigService, drivers multiplexed.Driver) StoreServiceManager

Jump to

Keyboard shortcuts

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