settings

package
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIURLEnvVar              = "SPLUNK_API_URL"
	ConfigEnvVar              = "SPLUNK_CONFIG"
	ConfigDirEnvVar           = "SPLUNK_CONFIG_DIR"
	ConfigServerEnabledEnvVar = "SPLUNK_DEBUG_CONFIG_SERVER"
	ConfigYamlEnvVar          = "SPLUNK_CONFIG_YAML"
	HecLogIngestURLEnvVar     = "SPLUNK_HEC_URL"
	ListenInterfaceEnvVar     = "SPLUNK_LISTEN_INTERFACE"
	GoMemLimitEnvVar          = "GOMEMLIMIT"
	GoGCEnvVar                = "GOGC"
	// nolint:gosec
	HecTokenEnvVar    = "SPLUNK_HEC_TOKEN" // this isn't a hardcoded token
	IngestURLEnvVar   = "SPLUNK_INGEST_URL"
	MemLimitMiBEnvVar = "SPLUNK_MEMORY_LIMIT_MIB"
	MemTotalEnvVar    = "SPLUNK_MEMORY_TOTAL_MIB"
	RealmEnvVar       = "SPLUNK_REALM"
	// nolint:gosec
	TokenEnvVar          = "SPLUNK_ACCESS_TOKEN" // this isn't a hardcoded token
	TraceIngestURLEnvVar = "SPLUNK_TRACE_URL"

	DefaultGatewayConfig   = "/etc/otel/collector/gateway_config.yaml"
	DefaultOTLPLinuxConfig = "/etc/otel/collector/otlp_config_linux.yaml"
	DefaultConfigDir       = "/etc/otel/collector/config.d"

	DefaultMemoryLimitPercentage = 90
	DefaultMemoryTotalMiB        = 512
	DefaultGoGC                  = 400
	DefaultListenInterface       = "0.0.0.0"
	DefaultAgentConfigLinux      = "/etc/otel/collector/agent_config.yaml"
)

Variables

View Source
var DefaultAgentConfigWindows = func() string {
	path := filepath.Join("Splunk", "OpenTelemetry Collector", "agent_config.yaml")
	if runtime.GOOS == "windows" {
		if pd, ok := os.LookupEnv("ProgramData"); ok {
			path = filepath.Join(pd, path)
		}
	}
	return filepath.Clean(path)
}()

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// contains filtered or unexported fields
}

func New

func New(args []string) (*Settings, error)

func (*Settings) ColCoreArgs added in v0.67.0

func (s *Settings) ColCoreArgs() []string

ColCoreArgs returns list of arguments to be passed to the collector core service.

func (*Settings) ConfMapConverterFactories added in v0.101.0

func (s *Settings) ConfMapConverterFactories() []confmap.ConverterFactory

ConfMapConverterFactories returns confmap.Converters for the collector core service.

func (*Settings) ConfMapProviderFactories added in v0.101.0

func (s *Settings) ConfMapProviderFactories() []confmap.ProviderFactory

ConfMapProviderFactories returns list of confmap.ProviderFactory for the collector core service.

func (*Settings) IsDryRun added in v0.63.0

func (s *Settings) IsDryRun() bool

IsDryRun returns whether --dry-run mode was requested

func (*Settings) ResolverURIs

func (s *Settings) ResolverURIs() []string

ResolverURIs returns config provider resolver URIs for the core collector service.

Jump to

Keyboard shortcuts

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