cluster

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HTTPPostTimeout = 30 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger            *logrus.Logger
	PollPodsFrequency time.Duration
}

func DefaultStoreConfig

func DefaultStoreConfig() Config

type Gossip

type Gossip struct {
	*serf.Serf
	// contains filtered or unexported fields
}

func NewGossip

func NewGossip(bindAddr string, join []string, port int, logOutput io.Writer) (*Gossip, error)

func (*Gossip) Events

func (g *Gossip) Events() <-chan serf.Event

type Store

type Store struct {
	Raft *raft.Raft

	sync.Mutex
	// contains filtered or unexported fields
}

func NewStore

func NewStore(gossip *Gossip, kubeClient *client.Kube, vaultClient *client.Vault, config Config) *Store

func (*Store) Apply

func (s *Store) Apply(l *raft.Log) interface{}

func (*Store) Restore

func (s *Store) Restore(snap io.ReadCloser) error

func (*Store) Shutdown

func (s *Store) Shutdown()

func (*Store) Snapshot

func (s *Store) Snapshot() (raft.FSMSnapshot, error)

func (*Store) StartRaft

func (s *Store) StartRaft(dataDir string, bindAddr string, logOutput io.Writer) error

Jump to

Keyboard shortcuts

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