backend

package
v0.0.0-...-dbfa1ae Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	SetConfig(config map[string]interface{}) error
	Setup(config *Config) error
	EmitStats(period time.Duration, stopCh <-chan struct{})
	Ports() int
	Close() error
}

Backend is the driver for the database

type Config

type Config struct {
	// TODO: Merge SetConfig with this
	System SystemView

	// BindAddr is the bind address for the backed
	BindAddr string

	// AdvertiseAddr is the advertise address for the backend
	AdvertiseAddr string

	// NodeName is the name of the node
	NodeName string

	// DataDir is the path of the data directory
	DataDir string
}

Config is the config for the backend

type Factory

type Factory func(logger hclog.Logger) Backend

Factory is a factory method to create a backend

type SystemView

type SystemView interface {
	RegisterRPC(i interface{})
	LeaderCh() chan bool
	ReconcileCh() chan serf.Member
	RPCRemote(server string, method string, args interface{}, reply interface{}) error
	Members() []serf.Member
	Peers() (reply []string)
	Leader() string
	Resolve(addr *net.TCPAddr) *net.TCPAddr
}

SystemView is the interface to interact with the cluster

Jump to

Keyboard shortcuts

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