fusion

package
v0.0.0-...-d9da918 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0, Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetricNamespace used to prefix metrics
	MetricNamespace = "prometheus_fusion"
)
View Source
const (
	// PrometheusConfigMapAnnotation is used to identify the configmap used by Prometheus
	PrometheusConfigMapAnnotation = "prometheus.io/configmap"
)

Variables

View Source
var (
	// VERSION of the fusion
	VERSION = "0.0.0.dev"
)

Functions

func ExposeMetrics

func ExposeMetrics(host string, metricPort int, stopCh <-chan struct{}, wg *sync.WaitGroup)

ExposeMetrics exposes the above defined metrics on <host>:<metricPort>/metrics

func LogDebug

func LogDebug(msg string, args ...interface{})

LogDebug logs debug messages, if DEBUG is enabled

func LogError

func LogError(msg string, args ...interface{})

LogError logs error messages

func LogFatal

func LogFatal(msg string, args ...interface{})

LogFatal logs debug messages, if DEBUG is enabled

func LogInfo

func LogInfo(msg string, args ...interface{})

LogInfo logs info messages

Types

type Operator

type Operator struct {
	Options

	ResyncPeriod  time.Duration
	RecheckPeriod time.Duration
	// contains filtered or unexported fields
}

Operator is the CNAME operator (fusion)

func New

func New(options Options) *Operator

New creates a new operator using the given options

func (*Operator) Run

func (fusion *Operator) Run(stopCh <-chan struct{}, wg *sync.WaitGroup)

Run starts the operator

type Options

type Options struct {
	KubeConfig                   string
	ConfigmapAnnotation          string
	PrometheusConfigMapNamespace string
	PrometheusConfigMapName      string
	PreservedConfigmapKeys       []string
	MetricPort                   int
	ResyncPeriod                 int
	RecheckPeriod                int
	Threadiness                  int
	LogLevel                     int
}

Options to configure the operator

func (*Options) CheckOptions

func (o *Options) CheckOptions() error

CheckOptions verifies the Options and sets default values, if necessary

Jump to

Keyboard shortcuts

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