internal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = version.Version("0.3.0", "$Format:%(describe)$", "$Format:%H$")

Version contains version and Git commit information.

The placeholders are replaced on `git archive` using the `export-subst` attribute.

Functions

func AutoDetectPrometheus added in v0.3.0

func AutoDetectPrometheus(ctx context.Context, clientset *kubernetes.Clientset, config *metrics.PrometheusConfig) error

AutoDetectPrometheus tries to auto-detect the Prometheus service in the monitoring namespace and if found sets the URL in the supplied Prometheus configuration. The first service with the label "app.kubernetes.io/name=prometheus" is used. Until now the ServiceTypes ClusterIP and NodePort are supported.

func SyncNotificationsConfig added in v0.3.0

func SyncNotificationsConfig(ctx context.Context, db *database.DB, config *notifications.Config, clusterUuid types.UUID) error

func SyncPrometheusConfig added in v0.3.0

func SyncPrometheusConfig(ctx context.Context, db *database.DB, config *metrics.PrometheusConfig, clusterUuid types.UUID) error

Types

type ChannelMultiplexer added in v0.3.0

type ChannelMultiplexer[T any] interface {
	// In adds the given input channel reading.
	In() chan<- T

	AddIn(chan T)

	// Out returns a new output channel that receives from all input channels.
	Out() <-chan T

	// AddOut registers the given output channel to receive from all input channels.
	AddOut(chan T)

	// Run starts multiplexing of all input channels to all output channels.
	// Once run is called, cannot be modified and will panic.
	Run(context.Context) error
}

ChannelMultiplexer is a multiplexer for channels of variable types. It fans out all input channels to all output channels.

func NewChannelMux added in v0.3.0

func NewChannelMux[T any](inChannels ...chan T) ChannelMultiplexer[T]

NewChannelMux returns a new ChannelMultiplexer initialized with at least one input channel.

type Multiplex

type Multiplex interface {
	In() chan interface{}
	Out() chan interface{}
	Do(context.Context) error
}

func NewMultiplex

func NewMultiplex() Multiplex

Directories

Path Synopsis
cache
v1

Jump to

Keyboard shortcuts

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