embedder

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Username = "root"
	Password = "613f#8d164df4ACPF49@93a510df49!66f98b*d6"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Embed

type Embed interface {
	Init(ctx context.Context, option ...Option) (err error)
	Run(ready chan struct{}) (err error)
	SetAuth(username, password string) (err error)
	IsLeader() bool
}

func NewEmbed

func NewEmbed() Embed

type Option

type Option func(opts *Options)

func WithClientPort

func WithClientPort(cp string) Option

func WithCluster

func WithCluster(clu []string) Option

func WithClusterState

func WithClusterState(state string) Option

func WithDir

func WithDir(dir string) Option

func WithIP

func WithIP(ip string) Option

func WithName

func WithName(name string) Option

func WithPeerPort

func WithPeerPort(pp string) Option

type Options

type Options struct {
	Name         string
	Dir          string
	IP           string
	ClientPort   string
	PeerPort     string
	Cluster      []string
	ClusterState string // "new" or "existing"
}

Jump to

Keyboard shortcuts

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