heartbeats

package
v1.5.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(originalService, mergedService *heartbeatv1.Service)

Merge merges `mergedService` into `originalService`. This sums `EntitiesCount`.

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
	ExtensionConfig                  *extconfig.FluxNinjaExtensionConfig
	GRPCServer                       *grpc.Server
	JobGroup                         *jobs.JobGroup                     `name:"heartbeats-job-group"`
	GRPClientConnectionBuilder       grpcclient.ClientConnectionBuilder `name:"heartbeats-grpc-client"`
	HTTPClient                       *http.Client                       `name:"heartbeats-http-client"`
	StatusRegistry                   status.Registry
	Entities                         *entities.Entities   `optional:"true"`
	AgentInfo                        *agentinfo.AgentInfo `optional:"true"`
	PeersWatcher                     *peers.PeerDiscovery `name:"fluxninja-peers-watcher" optional:"true"`
	EtcdClient                       *etcdclient.Client
	Election                         *election.Election                          `optional:"true"`
	PolicyFactory                    *controlplane.PolicyFactory                 `optional:"true"`
	FlowControlPoints                *cache.Cache[selectors.TypedControlPointID] `optional:"true"`
	AutoscaleKubernetesControlPoints autoscalediscovery.AutoScaleControlPoints   `optional:"true"`
}

ConstructorIn injects dependencies into the Heartbeats constructor.

type Heartbeats

type Heartbeats struct {
	heartbeatv1.UnimplementedControllerInfoServiceServer

	ControllerInfo *heartbeatv1.ControllerInfo

	APIKey string
	// contains filtered or unexported fields
}

Heartbeats is the struct that holds information about heartbeats.

func (*Heartbeats) GetControllerInfo

func (h *Heartbeats) GetControllerInfo(context.Context, *emptypb.Empty) (*heartbeatv1.ControllerInfo, error)

GetControllerInfo returns the controller info.

type PeersOut

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

PeersOut is a return struct provided to fx.

type ServiceKey

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

ServiceKey holds key for service.

Jump to

Keyboard shortcuts

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