config

package
v0.0.0-...-57b1a46 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EnvPrefix        = "TEMPO"
	StrategyBalanced = "balanced"
	StreategyGreedy  = "greedy"

	PRIMARY_ROLE   = "Primary"
	SECONDARY_ROLE = "Secondary"
)
View Source
const DefaultAPIPort = 8888

Variables

This section is empty.

Functions

func BindFlags

func BindFlags(cmd *cobra.Command, v *viper.Viper)

Bind each cobra flag to its associated viper configuration (config file and environment variable)

func GetAPIFlags

func GetAPIFlags() *pflag.FlagSet

func GetConfigFileName

func GetConfigFileName() string

func GetEventGridFlags

func GetEventGridFlags() *pflag.FlagSet

func GetGenericFlags

func GetGenericFlags() *pflag.FlagSet

func GetLoggingFlags

func GetLoggingFlags() *pflag.FlagSet

func GetMetricsFlags

func GetMetricsFlags() *pflag.FlagSet

func GetMonitorFlags

func GetMonitorFlags() *pflag.FlagSet

func GetTranslateFlags

func GetTranslateFlags() *pflag.FlagSet

Types

type ADXLogging

type ADXLogging struct {
	Enabled      bool          `yaml:"enabled" json:"enabled"`
	Endpoint     string        `yaml:"endpoint" json:"endpoint"`
	Database     string        `yaml:"database" json:"database"`
	RetryOptions RetryOptions  `yaml:"retry" json:"retry"`
	Timeout      time.Duration `yaml:"timeout" json:"timeout"`
}

type ADXTranslate

type ADXTranslate struct {
	Enabled         bool          `yaml:"enabled" json:"enabled"`
	Endpoint        string        `yaml:"endpoint" json:"endpoint"`
	Database        string        `yaml:"database" json:"database"`
	UpdateFrequency time.Duration `yaml:"updatefrequency" json:"updatefrequency"`
	RetryOptions    RetryOptions  `yaml:"retry" json:"retry"`
}

type API

type API struct {
	Path                string        `yaml:"path" json:"path"`
	Port                int           `yaml:"port" json:"port"`
	Enabled             bool          `yaml:"enabled" json:"enabled"`
	MemProfileFrequency time.Duration `yaml:"memprofilefrequency" json:"memprofilefrequency"`
}

type Bootstrap

type Bootstrap struct {
	Environment string    `yaml:"environment"`
	EventHub    EventHub  `yaml:"eventhub" json:"eventhub"`
	Translate   Translate `yaml:"translate" json:"translate"`
	Logging     Logging   `yaml:"logging" json:"logging"`
	Debug       bool      `yaml:"debug" json:"debug"`
	Metrics     Metrics   `yaml:"metrics" json:"metrics"`
	EventGrid   EventGrid `yaml:"eventgrid" json:"eventgrid"`
	Monitor     Monitor   `yaml:"monitor" json:"monitor"`
	API         API       `yaml:"api" json:"api"`
}

func Get

func Get() *Bootstrap

type Chaos

type Chaos struct {
	Enabled bool    `yaml:"enabled" json:"enabled"`
	Failure Failure `yaml:"failure" json:"failure"`
}

type Checkpoint

type Checkpoint struct {
	URL           string `yaml:"url" json:"url"`
	ContainerName string `yaml:"containername" json:"containername"`
}

type ConsoleLogging

type ConsoleLogging struct {
	Pretty bool `yaml:"pretty" json:"pretty"`
}

type Customer

type Customer struct {
	Subscriptions []string `yaml:"Subscriptions" json:"Subscriptions"`
}

type EventGrid

type EventGrid struct {
	Primary   EventGridOptions `yaml:"primary" json:"primary"`
	Secondary EventGridOptions `yaml:"secondary" json:"secondary"`
}

type EventGridOptions

type EventGridOptions struct {
	Endpoint     string       `yaml:"endpoint" json:"endpoint"`
	Topic        string       `yaml:"topic" json:"topic"`
	Chaos        Chaos        `yaml:"chaos" json:"chaos"`
	Key          string       `yaml:"key" json:"key"`
	RetryOptions RetryOptions `yaml:"retry" json:"retry"`
}

type EventHub

type EventHub struct {
	Namespace     string     `yaml:"eventHubNamespace" json:"eventHubNamespace"`
	Name          string     `yaml:"eventHubName" json:"eventHubName"`
	ConsumerGroup string     `yaml:"consumerGroup" json:"consumerGroup"`
	Checkpoint    Checkpoint `yaml:"checkpoint" json:"checkpoint"`
	Strategy      string     `yaml:"strategy" json:"strategy"`
}

type Failure

type Failure struct {
	Duration   time.Duration `yaml:"duration" json:"duration"`
	Every      time.Duration `yaml:"every" json:"every"`
	PerMessage int           `yaml:"permessage" json:"permessage"`
}

type FluentdLogging

type FluentdLogging struct {
	Enabled    bool   `yaml:"enabled" json:"enabled"`
	SocketPath string `yaml:"socketpath" json:"socketpath"`
}

type Health

type Health struct {
	Interval           time.Duration `yaml:"interval" json:"interval"`
	PreemptionHoldTime time.Duration `yaml:"preemptionholdtime" json:"preemptionholdtime"`
	Checkpoint         Checkpoint    `yaml:"checkpoint" json:"checkpoint"`
}

type InMem

type InMem struct {
	Enabled  bool          `yaml:"enabled" json:"enabled"`
	Interval time.Duration `yaml:"interval" json:"interval"`
	Retain   time.Duration `yaml:"retain" json:"retain"`
}

type Logging

type Logging struct {
	Console ConsoleLogging `yaml:"console" json:"console"`
	ADX     ADXLogging     `yaml:"adx" json:"adx"`
	Fluentd FluentdLogging `yaml:"fluentd" json:"fluentd"`
}

type Metrics

type Metrics struct {
	ADX           ADXLogging    `yaml:"adx" json:"adx"`
	FlushInterval time.Duration `yaml:"flushinterval" json:"flushinterval"`
}

type Monitor

type Monitor struct {
	Role   string `yaml:"role" json:"role"`
	Region string `yaml:"region" json:"region"`
	Health Health `yaml:"health" json:"health"`
}

type Prometheus

type Prometheus struct {
	Enabled bool   `yaml:"enabled" json:"enabled"`
	Port    int    `yaml:"port" json:"port"`
	Path    string `yaml:"path" json:"path"`
}

type RetryOptions

type RetryOptions struct {
	Delay     time.Duration `yaml:"delay" json:"delay"`
	MaxJitter time.Duration `yaml:"maxjitter" json:"maxjitter" `
	Attempts  uint          `yaml:"attempts" json:"attempts"`
}

type Statsd

type Statsd struct {
	Enabled bool   `yaml:"enabled" json:"enabled"`
	Service string `yaml:"service" json:"service"`
}

type Translate

type Translate struct {
	MessageExpiration time.Duration `yaml:"messageexpiration" json:"messageexpiration"`
	ADX               ADXTranslate  `yaml:"adx" json:"adx"`
	Chaos             Chaos         `yaml:"caos" json:"caos"`
	Logging           ADXLogging    `yaml:"logging" json:"logging"`
}

Jump to

Keyboard shortcuts

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