Documentation
¶
Index ¶
- func MakeEndpoints(host string, registry Registry, logger log.Logger)
- type Builder
- type Err
- type Iterator
- type Meta
- type MockStore
- func (s *MockStore) Backend() backend.Backend
- func (s *MockStore) Delete(ctx context.Context, key interface{}) error
- func (s *MockStore) Get(ctx context.Context, key interface{}) (value interface{}, err error)
- func (*MockStore) GetAll(ctx context.Context) (Iterator, error)
- func (*MockStore) GetRange(ctx context.Context, fromKey interface{}, toKey interface{}) (map[interface{}]interface{}, error)
- func (s *MockStore) KeyEncoder() encoding.Encoder
- func (s *MockStore) Name() string
- func (s *MockStore) Set(ctx context.Context, key interface{}, value interface{}, expiry time.Duration) error
- func (s *MockStore) String() string
- func (s *MockStore) ValEncoder() encoding.Encoder
- type Options
- type RecoverableStore
- type Registry
- type RegistryConfig
- type StateStore
- type StateStoreBuilder
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeEndpoints ¶
Types ¶
type MockStore ¶
type MockStore struct {
// contains filtered or unexported fields
}
func (*MockStore) KeyEncoder ¶
func (*MockStore) ValEncoder ¶
type Options ¶
type Options func(config *storeOptions)
func ChangelogEnabled ¶
func ChangelogEnabled() Options
func Compacated ¶
func Compacated() Options
func WithBackend ¶
func WithBackendBuilder ¶
func WithChangelog ¶
type RecoverableStore ¶
type Registry ¶
type Registry interface { Register(store Store) New(name string, keyEncoder encoding.Builder, valEncoder encoding.Builder, options ...Options) Store Store(name string) Store List() []string }
func NewRegistry ¶
func NewRegistry(config *RegistryConfig) Registry
type RegistryConfig ¶
type RegistryConfig struct { Host string StoreBuilder Builder StateStoreBuilder StateStoreBuilder Logger log.Logger MetricsReporter metrics.Reporter // contains filtered or unexported fields }
type StateStore ¶
type StateStore interface { Name() string Set(key interface{}, value interface{}) error Get(key interface{}) (value interface{}, err error) GetAll() ([]*data.Record, error) }
func NewStateStore ¶
type StateStoreBuilder ¶
type Store ¶
type Store interface { Name() string Backend() backend.Backend KeyEncoder() encoding.Encoder ValEncoder() encoding.Encoder Set(ctx context.Context, key interface{}, value interface{}, expiry time.Duration) error Get(ctx context.Context, key interface{}) (value interface{}, err error) GetRange(ctx context.Context, fromKey interface{}, toKey interface{}) (map[interface{}]interface{}, error) GetAll(ctx context.Context) (Iterator, error) Delete(ctx context.Context, key interface{}) error String() string }
func NewMockStore ¶
Click to show internal directories.
Click to hide internal directories.