coord

package
v0.0.0-...-50ecf45 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinator

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

func NewCoordinator

func NewCoordinator(resourceLock resourcelock.Interface, errChan chan<- error, isLeaderChan chan<- bool) (Coordinator, error)

func (Coordinator) Coordinate

func (c Coordinator) Coordinate(ctx context.Context)

func (Coordinator) IsLeader

func (c Coordinator) IsLeader() bool

type EventRecorderProvider

type EventRecorderProvider struct{}

func (EventRecorderProvider) GetEventRecorderFor

func (e EventRecorderProvider) GetEventRecorderFor(name string) record.EventRecorder

TODO: use a real recorder

type UnixSocketReporter

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

func NewUnixSocketReporter

func NewUnixSocketReporter(
	pollInterval time.Duration,
	unixSockPath string,
	errChan chan error,
	isLeaderChan chan bool,
	isLeaderFunc func() bool,
) (UnixSocketReporter, error)

func (UnixSocketReporter) Report

func (r UnixSocketReporter) Report(ctx context.Context)

Jump to

Keyboard shortcuts

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