Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = Config{ Versions: ReplicaConfig{ PID: 1, Region: "local", Name: "localhost", }, }
DefaultConfig is used if the user does not specify a configuration
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.2.6
type Config struct { Versions ReplicaConfig LDBOptions *ldbopt.Options }
Config specifies the options necessary to open a Honu database.
type Option ¶ added in v0.2.6
Option modifies a configuration to add optional configuration items.
func WithLevelDB ¶ added in v0.2.6
func WithReplica ¶ added in v0.2.6
func WithReplica(conf ReplicaConfig) Option
type ReplicaConfig ¶
type ReplicaConfig struct { PID uint64 `split_words:"true" required:"false"` Region string `split_words:"true" required:"false"` Name string `split_words:"true" required:"false"` }
ReplicaConfig specifies the information needed for the Version manager to maintain global object versioning and provenance. Honu is intended to support data replication by versioning using Lamport scalars. These conflict-free version numbers are closely tied to a replica's configuration (where a replica is a process that performs data replication using Honu), e.g. the PID is the process ID of a running replica, the region is where the replica is running, and the name is usually the hostname of the replica.