discovery

package
v2.17.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FxTagBase is the tag's base used to identify the Kubernetes Control Points Tracker.
	FxTagBase = "kubernetes_control_points"
	// FxTag is the tag used to identify the Kubernetes Control Points Tracker.
	FxTag = config.NameTag(FxTagBase)
)

Functions

func Module

func Module() fx.Option

Module returns the fx options for Kubernetes Control Point Discovery.

Types

type AutoScaleControlPoint

type AutoScaleControlPoint struct {
	Group     string
	Version   string
	Kind      string
	Namespace string
	Name      string
}

A AutoScaleControlPoint is identified by Group, Version, Kind, Namespace and Name.

func ControlPointFromSelector

func ControlPointFromSelector(k8sObjectSelector *policylangv1.KubernetesObjectSelector) (AutoScaleControlPoint, error)

ControlPointFromSelector converts a policylangv1.KubernetesObjectSelector to a ControlPoint.

func (*AutoScaleControlPoint) ToProto

ToProto converts a ControlPoint to a AutoScaleKubernetesControlPoint.

type AutoScaleControlPointStore

type AutoScaleControlPointStore interface {
	Add(cp AutoScaleControlPoint)
	Update(cp AutoScaleControlPoint)
	Delete(cp AutoScaleControlPoint)
}

AutoScaleControlPointStore is the interface for Storing Kubernetes Control Points.

type AutoScaleControlPoints

type AutoScaleControlPoints interface {
	Keys() []AutoScaleControlPoint
	AddKeyNotifier(notifiers.KeyNotifier) error
	RemoveKeyNotifier(notifiers.KeyNotifier) error
	ToProto() *controlpointsv1.AutoScaleKubernetesControlPoints
}

AutoScaleControlPoints is the interface for Reading or Watching Kubernetes Control Points.

type FxIn

type FxIn struct {
	fx.In
	Unmarshaller       config.Unmarshaller
	Lifecycle          fx.Lifecycle
	StatusRegistry     status.Registry
	KubernetesClient   k8s.K8sClient      `optional:"true"`
	Trackers           notifiers.Trackers `name:"kubernetes_control_points"`
	Election           *election.Election
	Config             autoscalek8sconfig.AutoScaleKubernetesConfig
	PrometheusRegistry *prometheus.Registry
	AgentInfo          *agentinfo.AgentInfo
}

FxIn is the input for the ProvideKuberetesControlPointsCache function.

Jump to

Keyboard shortcuts

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