config

package
v1.300039.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultThreshold        = 500
	DefaultRotationInterval = 1 * time.Hour
	DefaultGCInterval       = 10 * time.Minute
)
View Source
const (
	// PlatformGeneric Platforms other than Amazon EKS
	PlatformGeneric = "generic"
	// PlatformEKS Amazon EKS platform
	PlatformEKS = "eks"
	// PlatformK8s Native Kubernetes
	PlatformK8s = "k8s"
	// PlatformEC2 Amazon EC2 platform
	PlatformEC2 = "ec2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Resolvers []Resolver     `mapstructure:"resolvers"`
	Rules     []rules.Rule   `mapstructure:"rules"`
	Limiter   *LimiterConfig `mapstructure:"limiter"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

type LimiterConfig added in v1.300033.0

type LimiterConfig struct {
	Threshold                 int             `mapstructure:"drop_threshold"`
	Disabled                  bool            `mapstructure:"disabled"`
	LogDroppedMetrics         bool            `mapstructure:"log_dropped_metrics"`
	RotationInterval          time.Duration   `mapstructure:"rotation_interval"`
	GarbageCollectionInterval time.Duration   `mapstructure:"garbage_collection_interval"`
	ParentContext             context.Context `mapstructure:"-"`
}

func NewDefaultLimiterConfig added in v1.300033.0

func NewDefaultLimiterConfig() *LimiterConfig

func (*LimiterConfig) Validate added in v1.300033.0

func (lc *LimiterConfig) Validate()

type Resolver

type Resolver struct {
	Name     string `mapstructure:"name"`
	Platform string `mapstructure:"platform"`
}

func NewEC2Resolver added in v1.300034.0

func NewEC2Resolver(name string) Resolver

func NewEKSResolver

func NewEKSResolver(name string) Resolver

func NewGenericResolver

func NewGenericResolver(name string) Resolver

func NewK8sResolver added in v1.300033.0

func NewK8sResolver(name string) Resolver

Jump to

Keyboard shortcuts

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