leader

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Leader

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

Leader implements the Leader interface

func New

New creates a new LEDBroker

func (*Leader) Collect

func (l *Leader) Collect(ch chan<- prometheus.Metric)

func (*Leader) Describe

func (l *Leader) Describe(ch chan<- *prometheus.Desc)

func (*Leader) IsLeading

func (l *Leader) IsLeading() bool

IsLeading returns whether the Leader is leading

func (*Leader) RegisterClient

func (l *Leader) RegisterClient(clientURL string)

RegisterClient registers a new client with the Leader

func (*Leader) Run

func (l *Leader) Run(ctx context.Context) error

Run starts the Leader

func (*Leader) SetLeading

func (l *Leader) SetLeading(leading bool)

SetLeading marks whether the Leader should lead (i.e. set led states to endpoints)

func (*Leader) Stats

func (l *Leader) Stats() Stats

Stats returns the state of the instance

type Stats

type Stats struct {
	Endpoints []scheduler.RegisteredHost
}

Stats structure holds items we want to report in the /health endpoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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