raftclusterer

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

func NewWorker

func NewWorker(config Config) (worker.Worker, error)

NewWorker returns a new worker responsible for maintaining the raft cluster configuration.

Types

type Config

type Config struct {
	Raft *raft.Raft
	Hub  *pubsub.StructuredHub
}

Config holds the configuration necessary to run a worker for maintaining the raft cluster configuration.

func (Config) Validate

func (config Config) Validate() error

Validate validates the raft worker configuration.

type ManifoldConfig

type ManifoldConfig struct {
	RaftName       string
	CentralHubName string

	NewWorker func(Config) (worker.Worker, error)
}

ManifoldConfig holds the information necessary to run a worker for maintaining the raft cluster configuration in a dependency.Engine.

type Worker

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

Worker is a worker that manages raft cluster configuration.

func (*Worker) Kill

func (w *Worker) Kill()

Kill is part of the worker.Worker interface.

func (*Worker) Wait

func (w *Worker) Wait() error

Wait is part of the worker.Worker interface.

Jump to

Keyboard shortcuts

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