node

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElectionState

type ElectionState int32

elect

const (
	ElectionReadyState ElectionState = iota
	ElectionDoingState
)

type PinkNode

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

func NewPinkNode

func NewPinkNode(cli *etcd.Cli, eventBus *bus.EventBus) (*PinkNode, error)

func (*PinkNode) NotifyState

func (n *PinkNode) NotifyState(state int)

notify state

func (*PinkNode) Run

func (n *PinkNode) Run() error

self register

func (*PinkNode) Stop

func (n *PinkNode) Stop()

type State

type State int32
const (
	Follower State = iota + 1
	Leader
)

Jump to

Keyboard shortcuts

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