Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DKVService ¶
type DKVService interface { io.Closer serverpb.DKVServer serverpb.DKVDiscoveryNodeServer health.HealthServer }
A DKVService represents a service for serving key value data.
func NewService ¶
func NewService(store storage.KVStore, ca storage.ChangeApplier, regionInfo *serverpb.RegionInfo, replConf *ReplicationConfig, clusterInfo discovery.ClusterInfoGetter, serveropts *opts.ServerOpts) (DKVService, error)
NewService creates a slave DKVService that periodically polls for changes from master node and replicates them onto its local storage. As a result, it forbids changes to this local storage through any of the other key value mutators.
type ReplicationConfig ¶
type ReplicationConfig struct { // Max num changes to poll from master in a single replication call MaxNumChngs uint32 // Interval to periodically poll changes from master ReplPollInterval time.Duration // Maximum allowed replication lag from master for the slave to be considered valid MaxActiveReplLag uint64 // Maximum allowed replication time elapsed from master for the slave to be considered valid // Applicable when replication requests are erroring out due to an issue with master / slave MaxActiveReplElapsed uint64 // Listener address of the master node ReplMasterAddr string }
Click to show internal directories.
Click to hide internal directories.