leader

package
v0.8.1-0...-e8608f3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LeaderElector

type LeaderElector struct {
	URL string
}

func New

func New() *LeaderElector

New returns a LeaderElector with the default service endpoint

func NewWithURL

func NewWithURL(URL string) *LeaderElector

NewWithURL returns a LeaderElector with a custom service endpoint URL

func (*LeaderElector) IsLeader

func (le *LeaderElector) IsLeader() (bool, error)

IsLeader returns whether this host is the leader

type LeaderResponse

type LeaderResponse struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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