coordinator

package
v0.0.0-...-0194b68 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DataDir           string   // where to store raft data.
	BindAddr          string   // serf addr.
	CommunicationPort int      // port for raft and client connections
	StartJoinAddrs    []string // addresses to join to
	Bootstrap         bool     // should bootstrap cluster?
	NodeName          string   // raft server id
	LeaderStartAddr   string   // mostly for testing

	ServerTLS *tls.Config
	PeerTLS   *tls.Config
}

Config handles all of the customizable values for Service.

func (*Config) HTTPAddr

func (c *Config) HTTPAddr() (string, error)

HTTPAddr returns the HTTP address of the service's http handler.

func (*Config) RaftAddr

func (c *Config) RaftAddr() (string, error)

RaftAddr returns the raft connection address

type Coordinator

type Coordinator struct {
	Config Config
	// contains filtered or unexported fields
}

Coordinator handles connecting all of the independent components of the system. Mainly connecting the HTTP service and raft store is the main its main job.

func New

func New(conf Config) (*Coordinator, error)

New sets up all of the fields in the Coordinator and makes the service ready for running.

func (*Coordinator) Close

func (c *Coordinator) Close() error

Close shuts down the components and leaves the registry cluster.

Jump to

Keyboard shortcuts

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