dqlite

package
v0.0.0-...-18d89d2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PeersFile  = "peers.db"
	NodeIDFile = "node-id"
)

Variables

This section is empty.

Functions

func GetDBDir

func GetDBDir(dataDir string) string

Types

type Certs

type Certs struct {
	ServerTrust *x509.Certificate
	ClientTrust *x509.Certificate
	ClientCert  tls.Certificate
}

type DQLite

type DQLite struct {
	ClientCA      string
	ClientCAKey   string
	ClientCert    string
	ClientCertKey string
	ServerCA      string
	ServerCAKey   string
	AdvertiseIP   string
	AdvertisePort int
	DataDir       string
	NodeStore     client.NodeStore
	NodeInfo      client.NodeInfo

	StorageEndpoint      string
	NodeControllerGetter NodeControllerGetter
	// contains filtered or unexported fields
}

func New

func New(dataDir, advertiseIP string, advertisePort int, getter NodeControllerGetter) *DQLite

func (*DQLite) Join

func (d *DQLite) Join(ctx context.Context, nodes []client.NodeInfo) error

func (*DQLite) Reset

func (d *DQLite) Reset(ctx context.Context) error

func (*DQLite) Start

func (d *DQLite) Start(ctx context.Context, initCluster, resetCluster bool, certs *Certs, next http.Handler) (http.Handler, error)

func (*DQLite) Test

func (d *DQLite) Test(ctx context.Context) error

type NodeControllerGetter

type NodeControllerGetter func() v1.NodeController

Directories

Path Synopsis
controller

Jump to

Keyboard shortcuts

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