options

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorConfig added in v0.4.4

type CollectorConfig struct {
	Endpoint string `env:"ENDPOINT"`
}

CollectorConfig holds config values specific to the collector tracer exporter running locally / within your cluster. All the configuration values here have a prefix of ATMO_TRACER_COLLECTOR_, specified in the top level Options struct, and the parent TracerConfig struct.

type HoneycombConfig added in v0.4.4

type HoneycombConfig struct {
	Endpoint string `env:"ENDPOINT"`
	APIKey   string `env:"APIKEY"`
	Dataset  string `env:"DATASET"`
}

HoneycombConfig holds config values specific to the honeycomb tracer exporter. All the configuration values here have a prefix of ATMO_TRACER_HONEYCOMB_, specified in the top level Options struct, and the parent TracerConfig struct.

type Modifier

type Modifier func(*Options)

Modifier defines options for Atmo.

func AppName added in v0.4.7

func AppName(name string) Modifier

AppName sets the app name to be used.

func Domain added in v0.4.7

func Domain(domain string) Modifier

Domain sets the domain to be used.

func HTTPPort added in v0.4.7

func HTTPPort(port int) Modifier

HTTPPort sets the http port to be used.

func ShouldRunHeadless added in v0.2.3

func ShouldRunHeadless(headless bool) Modifier

ShouldRunHeadless sets wether Atmo should operate in 'headless' mode.

func ShouldWait added in v0.2.2

func ShouldWait(wait bool) Modifier

ShouldWait sets wether Atmo should wait for a bundle to become available on disk.

func TLSPort added in v0.4.7

func TLSPort(port int) Modifier

TLSPort sets the tls port to be used.

func UseBundlePath added in v0.2.3

func UseBundlePath(path string) Modifier

UseBundlePath sets the bundle path to be used.

func UseLogger

func UseLogger(logger *vlog.Logger) Modifier

UseLogger sets the logger to be used.

type Options

type Options struct {
	Logger           *vlog.Logger
	BundlePath       string `env:"ATMO_BUNDLE_PATH"`
	RunSchedules     *bool  `env:"ATMO_RUN_SCHEDULES,default=true"`
	Headless         *bool  `env:"ATMO_HEADLESS,default=false"`
	Wait             *bool  `env:"ATMO_WAIT,default=false"`
	ControlPlane     string `env:"ATMO_CONTROL_PLANE"`
	EnvironmentToken string `env:"ATMO_ENV_TOKEN"`
	StaticPeers      string `env:"ATMO_PEERS"`
	AppName          string `env:"ATMO_APP_NAME,default=Atmo"`
	Domain           string `env:"ATMO_DOMAIN"`
	HTTPPort         int    `env:"ATMO_HTTP_PORT,default=8080"`
	TLSPort          int    `env:"ATMO_TLS_PORT,default=443"`
	Proxy            bool
	TracerConfig     TracerConfig `env:",prefix=ATMO_TRACER_"`
}

Options defines options for Atmo.

func NewWithModifiers

func NewWithModifiers(mods ...Modifier) *Options

type TracerConfig added in v0.4.4

type TracerConfig struct {
	TracerType      string           `env:"TYPE,default=none"`
	ServiceName     string           `env:"SERVICENAME,default=atmo"`
	Probability     float64          `env:"PROBABILITY,default=0.5"`
	Collector       *CollectorConfig `env:",prefix=COLLECTOR_,noinit"`
	HoneycombConfig *HoneycombConfig `env:",prefix=HONEYCOMB_,noinit"`
}

TracerConfig holds values specific to setting up the tracer. It's only used in proxy mode. All configuration options have a prefix of ATMO_TRACER_ specified in the parent Options struct.

Jump to

Keyboard shortcuts

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