Documentation ¶
Index ¶
- Constants
- type OnDeleteFn
- type OnUpdateFn
- type Store
- func (s *Store[T, U]) ComputeUpdate(key string, load bool, fn func(key string, existing U) (U, error)) error
- func (s *Store[T, U]) Delete(key string) error
- func (s *Store[T, U]) Get(key string) (U, bool)
- func (s *Store[T, U]) GetBucket() string
- func (s *Store[T, U]) GetOrLoad(key string) (U, error)
- func (s *Store[T, U]) Keys(prefix string) ([]string, error)
- func (s *Store[T, U]) List() ([]U, error)
- func (s *Store[T, U]) Load(key string) (U, error)
- func (s *Store[T, U]) Put(key string, msg U) error
- func (s *Store[T, U]) Start(ctx context.Context) error
- type StoreOption
Constants ¶
View Source
const LockTimeout = 350 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OnDeleteFn ¶ added in v0.8.20
type OnUpdateFn ¶ added in v0.8.20
type Store ¶
type Store[T any, U protoMessage[T]] struct { OnUpdate OnUpdateFn[T, U] OnDelete OnDeleteFn[T, U] // contains filtered or unexported fields }
func NewWithLocks ¶ added in v0.8.20
func (*Store[T, U]) ComputeUpdate ¶
func (*Store[T, U]) Load ¶
Load data from kv store (this will add/update any existing local data entry) No record will be returned as nil and not stored
type StoreOption ¶ added in v0.8.20
Click to show internal directories.
Click to hide internal directories.