entrypoint

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// MaximumTickInterval is the maximum allowed interval when querying metrics
	MaximumTickInterval = 10 * time.Minute
	// MinimumTickInterval is the minimum allowed interval when querying metrics
	MinimumTickInterval = 5 * time.Second
	// DefaultEndPoint for leader election path
	DefaultEndPoint = "karavi-metrics-powermax"
	// DefaultNameSpace for PowerMax pod running metrics collection
	DefaultNameSpace = "karavi"
	// LivenessProbeInterval the interval to probe PowerMax connection liveness
	LivenessProbeInterval = 30 * time.Second
)

Variables

View Source
var ConfigValidatorFunc = ValidateConfig

ConfigValidatorFunc is used to override config validation in testing

Functions

func Run

func Run(ctx context.Context, config *Config, exporter otlexporters.Otlexporter, powerMaxSvc types.Service) error

Run is the entry point for starting the service

func ValidateConfig

func ValidateConfig(config *Config) error

ValidateConfig will validate the configuration and return any errors

Types

type Config

type Config struct {
	LeaderElector             types.LeaderElector
	CapacityTickInterval      time.Duration
	PerformanceTickInterval   time.Duration
	LivenessProbeTickInterval time.Duration
	CapacityMetricsEnabled    bool
	PerformanceMetricsEnabled bool
	CollectorAddress          string
	CollectorCertPath         string
	Logger                    *logrus.Logger
}

Config holds data that will be used by the service

Jump to

Keyboard shortcuts

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