embedder

package
v0.0.0-...-298ae05 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

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
	Close()
}

func NewEmbed

func NewEmbed() Embed

type Logger

type Logger interface {
	Info(...interface{})
	Infof(string, ...interface{})
	Error(...interface{})
	Errorf(string, ...interface{})
	Fatal(...interface{})
	Fatalf(string, ...interface{})
}

type Option

type Option func(opts *Options)

func WithClientAddr

func WithClientAddr(addr string) Option

func WithCluster

func WithCluster(cluster map[string]string) Option

func WithClusterState

func WithClusterState(state string) Option

func WithClusterToken

func WithClusterToken(token string) Option

func WithDir

func WithDir(dir string) Option

func WithLogger

func WithLogger(logger Logger) Option

func WithMetrics

func WithMetrics(addr string, mode string) Option

func WithName

func WithName(name string) Option

func WithPeerAddr

func WithPeerAddr(addr string) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

func DefaultOpts

func DefaultOpts() *Options

Jump to

Keyboard shortcuts

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