node

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MasterNode

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

func NewMasterNode

func NewMasterNode(config *MasterNodeConfig) (*MasterNode, error)

func (*MasterNode) Run

func (m *MasterNode) Run() error

func (*MasterNode) RunAsPrimary

func (m *MasterNode) RunAsPrimary() error

func (*MasterNode) RunAsSecondary

func (m *MasterNode) RunAsSecondary() error

type MasterNodeConfig

type MasterNodeConfig struct {
	NodeID             string
	Port               uint
	ForClientAddr      string
	ZookeeperServers   []string
	ZookeeperTimeout   time.Duration
	ElectionZnode      string
	ElectionPrefix     string
	ElectionAck        string
	KafkaServer        string
	KafkaTopic         string
	DB                 *gorm.DB
	CheckpointInterval time.Duration
	DataNodeGroups     []string
}

Jump to

Keyboard shortcuts

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