configuration

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Output of "git describe". The prerequisite is that the branch should be
	// tagged using the correct versioning strategy.
	GitVersion = "devel"
	// SHA1 from git, output of $(git rev-parse HEAD)
	GitCommit = "unknown"
	// State of git tree, either "clean" or "dirty"
	GitTreeState = "unknown"
	// Build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ')
	BuildDate = "unknown"
)

Base version information.

This is the fallback data used when version information from git is not provided via go ldflags (e.g. via Makefile).

Functions

This section is empty.

Types

type AwsConfig

type AwsConfig struct {
	Region     string `mapstructure:"region"`
	AccessKey  string `mapstructure:"access_key"`
	SecretKey  string `mapstructure:"secret_key"`
	RoleArn    string `mapstructure:"role_arn"`
	ExternalID string `mapstructure:"external_id"`
}

type Configuration

type Configuration struct {
	Notifiers        map[string]map[string]interface{} `mapstructure:"notifiers"`
	AwsConfig        AwsConfig                         `mapstructure:"aws"`
	GcpConfig        GcpConfig                         `mapstructure:"gcp"`
	LogFormat        string                            `mapstructure:"log_format"`
	KubeConfig       string                            `mapstructure:"kubeconfig"`
	ListenAddress    string                            `mapstructure:"listen_address"`
	MinioConfig      MinioConfig                       `mapstructure:"minio"`
	RulesFiles       []string                          `mapstructure:"rules_files"`
	DefaultNotifiers []string                          `mapstructure:"default_notifiers"`
	Otel             Otel                              `mapstructure:"otel"`
	Deduplication    deduplication                     `mapstructure:"deduplication"`
	ListenPort       int                               `mapstructure:"listen_port"`
	WatchRules       bool                              `mapstructure:"watch_rules"`
	PrintAllEvents   bool                              `mapstructure:"print_all_events"`
}

func CreateConfiguration

func CreateConfiguration(configFile string) *Configuration

func GetConfiguration

func GetConfiguration() *Configuration

func (*Configuration) ListDefaultNotifiers

func (c *Configuration) ListDefaultNotifiers() []string

type GcpConfig

type GcpConfig struct {
	Region          string `mapstructure:"region"`
	CredentialsPath string `mapstructure:"credentials_path"`
}

type Info

type Info struct {
	GitVersion   string
	GitCommit    string
	GitTreeState string
	BuildDate    string
	GoVersion    string
	Compiler     string
	Platform     string
}

func GetInfo

func GetInfo() *Info

func (*Info) String

func (i *Info) String() string

String returns the string representation of the version info

type MinioConfig

type MinioConfig struct {
	Endpoint  string `mapstructure:"endpoint"`
	AccessKey string `mapstructure:"access_key"`
	SecretKey string `mapstructure:"secret_key"`
	UseSSL    bool   `mapstructure:"use_ssl"`
}

type Otel

type Otel struct {
	CollectorEndpoint        string `mapstructure:"collector_endpoint"`
	CollectorPort            string `mapstructure:"collector_port"`
	Timeout                  int    `mapstructure:"timeout"`
	CollectorUseInsecureGrpc bool   `mapstructure:"collector_use_insecure_grpc"`
	TracesEnabled            bool   `mapstructure:"traces_enabled"`
	MetricsEnabled           bool   `mapstructure:"metrics_enabled"`
}

Jump to

Keyboard shortcuts

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