Documentation
¶
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) GetCurrent(_ context.Context) (uint64, error)
- func (s *Store) GetCurrentForClass(ctx context.Context, class string) (uint64, error)
- func (s *Store) GetDictBytes(_ context.Context, dictID uint64) ([]byte, error)
- func (s *Store) GetK(ctx context.Context, dictID uint64) (int, error)
- func (s *Store) PutDictBytes(ctx context.Context, dictBytes []byte) (uint64, error)
- func (s *Store) SetCurrent(ctx context.Context, dictID uint64) error
- func (s *Store) SetCurrentForClass(ctx context.Context, class string, dictID uint64) error
- func (s *Store) SetK(ctx context.Context, dictID uint64, k int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides access to dictionary storage backed by a TreeDB backend.
func (*Store) GetCurrent ¶
GetCurrent returns the current dictionary ID or 0 if unset.
func (*Store) GetCurrentForClass ¶ added in v0.4.0
GetCurrentForClass returns the current dictionary ID for a payload class. Empty class and aliases "single"/"default" fall back to the legacy global current marker.
func (*Store) GetDictBytes ¶
GetDictBytes returns the dictionary bytes for dictID.
func (*Store) GetK ¶
GetK loads the preferred frame group size (K) for dictID. Returns 0 when unset.
func (*Store) PutDictBytes ¶
PutDictBytes inserts dict bytes (deduped by hash) and returns its dictID.
func (*Store) SetCurrent ¶
SetCurrent marks dictID as the current dictionary.
func (*Store) SetCurrentForClass ¶ added in v0.4.0
SetCurrentForClass marks dictID as the current dictionary for a payload class. Empty class and aliases "single"/"default" use the legacy global current key. A dictID of 0 clears the class marker via DeleteSync.