config

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2023 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

func New added in v0.2.6

func New(options ...Option) (_ Config, err error)

New creates a configuration with the required options and can also be used to specify optional configuration e.g. for engine-specific operations.

type Option added in v0.2.6

type Option func(*Config) error

Option modifies a configuration to add optional configuration items.

func WithLevelDB added in v0.2.6

func WithLevelDB(opt *ldbopt.Options) Option

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL