Documentation
¶
Index ¶
- func WithBadgerDir[V any](dir string) options.Option[createClientParams[V]]
- func WithHashFunc[V any](hf hashringx.HashFunc) options.Option[createClientParams[V]]
- func WithLocalRepo[V any](repo local_kv_pairs.Repository[V]) options.Option[createClientParams[V]]
- func WithLocalRepoTombstonesTTL[V any](ttl time.Duration) options.Option[createClientParams[V]]
- func WithLogger[V any](l zerolog.Logger) options.Option[createClientParams[V]]
- func WithMerger[V any](m Merger[V]) options.Option[createClientParams[V]]
- func WithNodeWeight[V any](w uint) options.Option[createClientParams[V]]
- func WithRemoteRepoAndController[V any](repo remote_kv_pairs.Gateway[V], ctrl Controller[V]) options.Option[createClientParams[V]]
- func WithReplicasCount[V any](r uint8) options.Option[createClientParams[V]]
- func WithRevertTimeout[V any](to time.Duration) options.Option[createClientParams[V]]
- func WithServicePort[V any](p int) options.Option[createClientParams[V]]
- type Client
- type Controller
- type Discovery
- type ErrKeyNotFoundError
- type KvTooOldError
- type Merger
- type Node
- type Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithBadgerDir ¶
Sets custom badger root dir. Default is ./badger
func WithHashFunc ¶
Sets custom hashring func. Default is md5.
func WithLocalRepo ¶
func WithLocalRepo[V any]( repo local_kv_pairs.Repository[V], ) options.Option[createClientParams[V]]
Sets user-defined implementation of local repository. Default is badger persistent repo.
WARNING! Apply this opt only if you know what you are doing.
func WithLocalRepoTombstonesTTL ¶
Sets custom tombstone TTL. Default is 1 day.
func WithLogger ¶
Sets custom logger. Default is stdout logger.
func WithMerger ¶
Sets custom merger. By default newest data overrites old one.
func WithNodeWeight ¶
Sets custom node weight to report to discovery. Default is 1.
func WithRemoteRepoAndController ¶
func WithRemoteRepoAndController[V any]( repo remote_kv_pairs.Gateway[V], ctrl Controller[V], ) options.Option[createClientParams[V]]
Sets user-defined implementations of remote repo and coresponding controller. Default are HTTP.
WARNING! Apply this opt only if you know what you are doing.
func WithReplicasCount ¶
Sets custom write replicas count. Default is 2.
func WithRevertTimeout ¶
Sets custom timeout for transaction revert. Default is 10s.
Types ¶
type Client ¶
func (*Client[V]) Metrics ¶
func (cl *Client[V]) Metrics() []prometheus.Collector
type Controller ¶
type ErrKeyNotFoundError ¶
type ErrKeyNotFoundError = model.KeyNotFoundError
type KvTooOldError ¶
type KvTooOldError = model.KvTooOldError

