heartbeats

package
v0.1.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Invoke

func Invoke(*Heartbeats)

Invoke enables heartbeats in FX.

func Module

func Module() fx.Option

Module returns the module for heartbeats.

func PeersWatcherModule

func PeersWatcherModule() fx.Option

PeersWatcherModule is a fx module that watches all agent peers.

Types

type ConstructorIn

type ConstructorIn struct {
	fx.In

	Lifecycle                  fx.Lifecycle
	Unmarshaller               config.Unmarshaller
	JobGroup                   *jobs.JobGroup                     `name:"heartbeats-job-group"`
	GRPClientConnectionBuilder grpcclient.ClientConnectionBuilder `name:"heartbeats-grpc-client"`
	HTTPClient                 *http.Client                       `name:"heartbeats-http-client"`
	StatusRegistry             *status.Registry
	EntityCache                *entitycache.EntityCache `optional:"true"`
	AgentInfo                  *agentinfo.AgentInfo     `optional:"true"`
	PeersWatcher               *peers.PeerDiscovery     `name:"fluxninja-peers-watcher" optional:"true"`
	EtcdClient                 *etcdclient.Client
}

ConstructorIn injects dependencies into the Heartbeats constructor.

type Heartbeats

type Heartbeats struct {
	APIKey string
	// contains filtered or unexported fields
}

func Provide

func Provide(in ConstructorIn) (*Heartbeats, error)

Provide provides a new instance of Heartbeats.

func (*Heartbeats) GetControllerInfo

func (h *Heartbeats) GetControllerInfo() *heartbeatv1.ControllerInfo

type PeersOut

type PeersOut struct {
	fx.Out
	PeerWatcher *peers.PeerDiscovery `name:"fluxninja-peers-watcher" optional:"true"`
}

PeersOut is a return struct provided to fx.

Jump to

Keyboard shortcuts

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