cmd

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdSentinel = &cobra.Command{
	Use:     "stolon-sentinel",
	Run:     sentinel,
	Version: cmd.Version,
}

Functions

func Execute

func Execute()

Types

type ConvergenceState

type ConvergenceState uint
const (
	Converging ConvergenceState = iota
	Converged
	ConvergenceFailed
)

type DBConvergenceInfo

type DBConvergenceInfo struct {
	Generation int64
	Timer      int64
}

type KeeperInfoHistories

type KeeperInfoHistories map[string]*KeeperInfoHistory

func (KeeperInfoHistories) DeepCopy

type KeeperInfoHistory

type KeeperInfoHistory struct {
	KeeperInfo *cluster.KeeperInfo
	Seen       bool
	Timer      int64
}

type ProxyInfoHistories

type ProxyInfoHistories map[string]*ProxyInfoHistory

func (ProxyInfoHistories) DeepCopy

type ProxyInfoHistory

type ProxyInfoHistory struct {
	ProxyInfo *cluster.ProxyInfo
	Timer     int64
}

type Sentinel

type Sentinel struct {

	// Make UIDFn settable to ease testing with reproducible UIDs
	UIDFn func() string
	// Make RandFn settable to ease testing with reproducible "random" numbers
	RandFn func(int) int
	// contains filtered or unexported fields
}

func NewSentinel

func NewSentinel(uid string, cfg *config, end chan bool) (*Sentinel, error)

func (*Sentinel) CleanDBError

func (s *Sentinel) CleanDBError(uid string)

func (*Sentinel) CleanDBNotIncreasingXLogPos

func (s *Sentinel) CleanDBNotIncreasingXLogPos(uid string)

func (*Sentinel) CleanKeeperError

func (s *Sentinel) CleanKeeperError(uid string)

func (*Sentinel) SetDBError

func (s *Sentinel) SetDBError(uid string)

func (*Sentinel) SetDBNotIncreasingXLogPos

func (s *Sentinel) SetDBNotIncreasingXLogPos(uid string)

func (*Sentinel) SetKeeperError

func (s *Sentinel) SetKeeperError(uid string)

func (*Sentinel) Start

func (s *Sentinel) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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