election

package
v0.0.0-...-e0071fa Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

This package provide a simple way to use etcd to election the leader of the cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(machines []string, etcd_dir, etcd_nodes, etcd_leader, addr string, interval time.Duration)

Types

type Cluster

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

type Node

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

func (*Node) GetCluster

func (n *Node) GetCluster()

func (*Node) Serve

func (n *Node) Serve()

Listen and watch.

Jump to

Keyboard shortcuts

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