config

package
v3.0.0-...-28adb68 Latest Latest
Warning

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

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

Documentation

Overview

Copyright (c) F5, Inc.

This source code is licensed under the Apache License, Version 2.0 license found in the LICENSE file in the root directory of this source tree.

Copyright (c) F5, Inc.

This source code is licensed under the Apache License, Version 2.0 license found in the LICENSE file in the root directory of this source tree.

Index

Constants

View Source
const (
	ConfigFileName = "nginx-agent.conf"
	EnvPrefix      = "NGINX_AGENT"
	KeyDelimiter   = "_"
)
View Source
const (
	DefGracefulShutdownPeriod      = 5 * time.Second
	DefNginxReloadMonitoringPeriod = 10 * time.Second
	DefTreatErrorsAsWarnings       = false

	DefCommandServerHostKey    = ""
	DefCommandServerPortKey    = 0
	DefCommandServerTypeKey    = "grpc"
	DefCommandAuthTokenKey     = ""
	DefCommandTLSCertKey       = ""
	DefCommandTLSKeyKey        = ""
	DefCommandTLSCaKey         = ""
	DefCommandTLSSkipVerifyKey = false
	DefCommandTLServerNameKey  = ""

	DefMaxMessageSize        = 0       // 0 = unset
	DefMaxMessageRecieveSize = 4194304 // default 4 MB
	DefMaxMessageSendSize    = math.MaxInt32

	// Backoff defaults
	DefBackoffInitialInterval     = 50 * time.Millisecond
	DefBackoffRandomizationFactor = 0.1 // the value is 0 <= and < 1
	DefBackoffMultiplier          = 1.5
	DefBackoffMaxInterval         = 200 * time.Millisecond
	DefBackoffMaxElapsedTime      = 3 * time.Second

	// Watcher defaults
	DefInstanceWatcherMonitoringFrequency       = 5 * time.Second
	DefInstanceHealthWatcherMonitoringFrequency = 5 * time.Second
	DefFileWatcherMonitoringFrequency           = 5 * time.Second

	// Collector defaults
	DefCollectorConfigPath  = "/etc/nginx-agent/opentelemetry-collector-agent.yaml"
	DefCollectorLogLevel    = "INFO"
	DefCollectorLogPath     = "/var/log/nginx-agent/opentelemetry-collector-agent.log"
	DefCollectorTLSCertPath = "/var/lib/nginx-agent/cert.pem"
	DefCollectorTLSKeyPath  = "/var/lib/nginx-agent/key.pem"
	DefCollectorTLSCAPath   = "/var/lib/nginx-agent/ca.pem"
	DefCollectorTLSSANNames = "127.0.0.1,::1,localhost"

	DefCollectorBatchProcessorSendBatchSize    = 8192
	DefCollectorBatchProcessorSendBatchMaxSize = 0
	DefCollectorBatchProcessorTimeout          = 200 * time.Millisecond

	DefCollectorExtensionsHealthServerHost      = "localhost"
	DefCollectorExtensionsHealthServerPort      = 13133
	DefCollectorExtensionsHealthPath            = "/"
	DefCollectorExtensionsHealthTLSCertPath     = ""
	DefCollectorExtensionsHealthTLSKeyPath      = ""
	DefCollectorExtensionsHealthTLSCAPath       = ""
	DefCollectorExtensionsHealthTLSSkipVerify   = false
	DefCollectorExtensionsHealthTLServerNameKey = ""
)
View Source
const (
	ClientRootKey                               = "client"
	AllowedDirectoriesKey                       = "allowed_directories"
	ConfigPathKey                               = "path"
	CommandRootKey                              = "command"
	DataPlaneConfigRootKey                      = "data_plane_config"
	LogLevelRootKey                             = "log"
	CollectorRootKey                            = "collector"
	VersionKey                                  = "version"
	UUIDKey                                     = "uuid"
	FeaturesKey                                 = "features"
	InstanceWatcherMonitoringFrequencyKey       = "watchers_instance_watcher_monitoring_frequency"
	InstanceHealthWatcherMonitoringFrequencyKey = "watchers_instance_health_watcher_monitoring_frequency"
	FileWatcherMonitoringFrequencyKey           = "watchers_file_watcher_monitoring_frequency"
)

Variables

View Source
var (
	// child flags saved as vars to enable easier prefixing.
	ClientPermitWithoutStreamKey                = pre(ClientRootKey) + "permit_without_stream"
	ClientTimeKey                               = pre(ClientRootKey) + "time"
	ClientTimeoutKey                            = pre(ClientRootKey) + "timeout"
	ClientMaxMessageSendSizeKey                 = pre(ClientRootKey) + "max_message_send_size"
	ClientMaxMessageReceiveSizeKey              = pre(ClientRootKey) + "max_message_receive_size"
	ClientMaxMessageSizeKey                     = pre(ClientRootKey) + "max_message_size"
	CollectorConfigPathKey                      = pre(CollectorRootKey) + "config_path"
	CollectorExportersKey                       = pre(CollectorRootKey) + "exporters"
	CollectorAttributeProcessorKey              = pre(CollectorProcessorsKey) + "attribute"
	CollectorDebugExporterKey                   = pre(CollectorExportersKey) + "debug"
	CollectorPrometheusExporterKey              = pre(CollectorExportersKey) + "prometheus_exporter"
	CollectorPrometheusExporterServerHostKey    = pre(CollectorPrometheusExporterKey) + "server_host"
	CollectorPrometheusExporterServerPortKey    = pre(CollectorPrometheusExporterKey) + "server_port"
	CollectorPrometheusExporterTLSKey           = pre(CollectorPrometheusExporterKey) + "tls"
	CollectorPrometheusExporterTLSCertKey       = pre(CollectorPrometheusExporterTLSKey) + "cert"
	CollectorPrometheusExporterTLSKeyKey        = pre(CollectorPrometheusExporterTLSKey) + "key"
	CollectorPrometheusExporterTLSCaKey         = pre(CollectorPrometheusExporterTLSKey) + "ca"
	CollectorPrometheusExporterTLSSkipVerifyKey = pre(CollectorPrometheusExporterTLSKey) + "skip_verify"
	CollectorPrometheusExporterTLSServerNameKey = pre(CollectorPrometheusExporterTLSKey) + "server_name"
	CollectorOtlpExportersKey                   = pre(CollectorExportersKey) + "otlp_exporters"
	CollectorProcessorsKey                      = pre(CollectorRootKey) + "processors"
	CollectorBatchProcessorKey                  = pre(CollectorProcessorsKey) + "batch"
	CollectorBatchProcessorSendBatchSizeKey     = pre(CollectorBatchProcessorKey) + "send_batch_size"
	CollectorBatchProcessorSendBatchMaxSizeKey  = pre(CollectorBatchProcessorKey) + "send_batch_max_size"
	CollectorBatchProcessorTimeoutKey           = pre(CollectorBatchProcessorKey) + "timeout"
	CollectorExtensionsKey                      = pre(CollectorRootKey) + "extensions"
	CollectorExtensionsHealthKey                = pre(CollectorExtensionsKey) + "health"
	CollectorExtensionsHealthServerHostKey      = pre(CollectorExtensionsHealthKey) + "server_host"
	CollectorExtensionsHealthServerPortKey      = pre(CollectorExtensionsHealthKey) + "server_port"
	CollectorExtensionsHealthPathKey            = pre(CollectorExtensionsHealthKey) + "path"
	CollectorExtensionsHealthTLSKey             = pre(CollectorExtensionsHealthKey) + "tls"
	CollectorExtensionsHealthTLSCaKey           = pre(CollectorExtensionsHealthTLSKey) + "ca"
	CollectorExtensionsHealthTLSCertKey         = pre(CollectorExtensionsHealthTLSKey) + "cert"
	CollectorExtensionsHealthTLSKeyKey          = pre(CollectorExtensionsHealthTLSKey) + "key"
	CollectorExtensionsHealthTLSServerNameKey   = pre(CollectorExtensionsHealthTLSKey) + "server_name"
	CollectorExtensionsHealthTLSSkipVerifyKey   = pre(CollectorExtensionsHealthTLSKey) + "skip_verify"
	CollectorExtensionsHeadersSetterKey         = pre(CollectorExtensionsKey) + "headers_setter"
	CollectorReceiversKey                       = pre(CollectorRootKey) + "receivers"
	CollectorLogKey                             = pre(CollectorRootKey) + "log"
	CollectorLogLevelKey                        = pre(CollectorLogKey) + "level"
	CollectorLogPathKey                         = pre(CollectorLogKey) + "path"
	CommandAuthKey                              = pre(CommandRootKey) + "auth"
	CommandAuthTokenKey                         = pre(CommandAuthKey) + "token"
	CommandServerHostKey                        = pre(CommandServerKey) + "host"
	CommandServerKey                            = pre(CommandRootKey) + "server"
	CommandServerPortKey                        = pre(CommandServerKey) + "port"
	CommandServerTypeKey                        = pre(CommandServerKey) + "type"
	CommandTLSKey                               = pre(CommandRootKey) + "tls"
	CommandTLSCaKey                             = pre(CommandTLSKey) + "ca"
	CommandTLSCertKey                           = pre(CommandTLSKey) + "cert"
	CommandTLSKeyKey                            = pre(CommandTLSKey) + "key"
	CommandTLSServerNameKey                     = pre(CommandTLSKey) + "server_name"
	CommandTLSSkipVerifyKey                     = pre(CommandTLSKey) + "skip_verify"
	LogLevelKey                                 = pre(LogLevelRootKey) + "level"
	LogPathKey                                  = pre(LogLevelRootKey) + "path"
	NginxReloadMonitoringPeriodKey              = pre(DataPlaneConfigRootKey, "nginx") + "reload_monitoring_period"
	NginxTreatWarningsAsErrorsKey               = pre(DataPlaneConfigRootKey, "nginx") + "treat_warnings_as_errors"
	NginxExcludeLogsKey                         = pre(DataPlaneConfigRootKey, "nginx") + "exclude_logs"
)
View Source
var CompletionCommand = &cobra.Command{
	Use:   "completion [bash|zsh|fish]",
	Short: "Generate completion script.",
	Long: `To load completions:

Bash:

$ source <(nginx-agent completion bash)

# To load completions for each session, execute once:
Linux:
  $ nginx-agent completion bash > /etc/bash_completion.d/nginx-agent
MacOS:
  $ nginx-agent completion bash > /usr/local/etc/bash_completion.d/nginx-agent

Zsh:

# If shell completion is not already enabled in your environment you will need
# to enable it.  You can execute the following once:

$ echo "autoload -U compinit; compinit" >> ~/.zshrc

# To load completions for each session, execute once:
$ nginx-agent completion zsh > "${fpath[1]}/_nginx-agent"

# You will need to start a new shell for this setup to take effect.

Fish:

$ nginx-agent completion fish | source

# To load completions for each session, execute once:
$ nginx-agent completion fish > ~/.config/fish/completions/nginx-agent.fish
`,
	DisableFlagsInUseLine: true,
	ValidArgs:             []string{"bash", "zsh", "fish"},
	Args:                  cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
	Run: func(cmd *cobra.Command, args []string) {
		var err error

		switch args[0] {
		case "bash":
			err = cmd.Root().GenBashCompletion(os.Stdout)
		case "zsh":
			err = cmd.Root().GenZshCompletion(os.Stdout)
		case "fish":
			err = cmd.Root().GenFishCompletion(os.Stdout, true)
		}

		if err != nil {
			slog.Warn("Error sending command", "error", err)
		}
	},
}
View Source
var RootCommand = &cobra.Command{
	Use:   "nginx-agent [flags]",
	Short: "nginx-agent",
}

Functions

func DefaultAllowedDirectories

func DefaultAllowedDirectories() []string

func DefaultFeatures

func DefaultFeatures() []string

func Execute

func Execute(ctx context.Context) error

func Init

func Init(version, commit string)

func RegisterConfigFile

func RegisterConfigFile() error

func RegisterRunner

func RegisterRunner(r func(cmd *cobra.Command, args []string))

func ToCommandProto

func ToCommandProto(cmd *Command) *mpi.CommandServer

ToCommandProto maps the AgentConfig Command struct back to the Command proto message

Types

type APIDetails

type APIDetails struct {
	URL      string `yaml:"-" mapstructure:"url"`
	Listen   string `yaml:"-" mapstructure:"listen"`
	Location string `yaml:"-" mapstructure:"location"`
}

type AccessLog

type AccessLog struct {
	FilePath  string `yaml:"-" mapstructure:"file_path"`
	LogFormat string `yaml:"-" mapstructure:"log_format"`
}

type Action

type Action struct {
	Key    string `yaml:"key"    mapstructure:"key"`
	Action string `yaml:"action" mapstructure:"action"`
	Value  string `yaml:"value"  mapstructure:"value"`
}

type Attribute

type Attribute struct {
	Actions []Action `yaml:"-" mapstructure:"actions"`
}

type AuthConfig

type AuthConfig struct {
	Token string `yaml:"-" mapstructure:"token"`
}

type Batch

type Batch struct {
	SendBatchSize    uint32        `yaml:"-" mapstructure:"send_batch_size"`
	SendBatchMaxSize uint32        `yaml:"-" mapstructure:"send_batch_max_size"`
	Timeout          time.Duration `yaml:"-" mapstructure:"timeout"`
}

type CPUScraper

type CPUScraper struct{}

type Client

type Client struct {
	Timeout             time.Duration `yaml:"-" mapstructure:"timeout"`
	Time                time.Duration `yaml:"-" mapstructure:"time"`
	PermitWithoutStream bool          `yaml:"-" mapstructure:"permit_without_stream"`
	// if MaxMessageSize is size set then we use that value,
	// otherwise MaxMessageRecieveSize and MaxMessageSendSize for individual settings
	MaxMessageSize        int `yaml:"-" mapstructure:"max_message_size"`
	MaxMessageRecieveSize int `yaml:"-" mapstructure:"max_message_receive_size"`
	MaxMessageSendSize    int `yaml:"-" mapstructure:"max_message_send_size"`
}

type Collector

type Collector struct {
	ConfigPath string     `yaml:"-" mapstructure:"config_path"`
	Log        *Log       `yaml:"-" mapstructure:"log"`
	Exporters  Exporters  `yaml:"-" mapstructure:"exporters"`
	Extensions Extensions `yaml:"-" mapstructure:"extensions"`
	Processors Processors `yaml:"-" mapstructure:"processors"`
	Receivers  Receivers  `yaml:"-" mapstructure:"receivers"`
}

func (*Collector) Validate

func (col *Collector) Validate(allowedDirectories []string) error

type Command

type Command struct {
	Server *ServerConfig `yaml:"-" mapstructure:"server"`
	Auth   *AuthConfig   `yaml:"-" mapstructure:"auth"`
	TLS    *TLSConfig    `yaml:"-" mapstructure:"tls"`
}

func FromCommandProto

func FromCommandProto(config *mpi.CommandServer) *Command

FromCommandProto maps the AgentConfig Command struct to the Command proto message

type CommonSettings

type CommonSettings struct {
	InitialInterval     time.Duration `yaml:"-" mapstructure:"initial_interval"`
	MaxInterval         time.Duration `yaml:"-" mapstructure:"max_interval"`
	MaxElapsedTime      time.Duration `yaml:"-" mapstructure:"max_elapsed_time"`
	RandomizationFactor float64       `yaml:"-" mapstructure:"randomization_factor"`
	Multiplier          float64       `yaml:"-" mapstructure:"multiplier"`
}

type Config

type Config struct {
	Command            *Command         `yaml:"-" mapstructure:"command"`
	Log                *Log             `yaml:"-" mapstructure:"log"`
	DataPlaneConfig    *DataPlaneConfig `yaml:"-" mapstructure:"data_plane_config"`
	Client             *Client          `yaml:"-" mapstructure:"client"`
	Collector          *Collector       `yaml:"-" mapstructure:"collector"`
	File               *File            `yaml:"-" mapstructure:"file"`
	Common             *CommonSettings  `yaml:"-"`
	Watchers           *Watchers        `yaml:"-"`
	Version            string           `yaml:"-"`
	Path               string           `yaml:"-"`
	UUID               string           `yaml:"-"`
	AllowedDirectories []string         `yaml:"-" mapstructure:"allowed_directories"`
	Features           []string         `yaml:"-"`
}

func ResolveConfig

func ResolveConfig() (*Config, error)

func (*Config) AreReceiversConfigured

func (c *Config) AreReceiversConfigured() bool

func (*Config) IsACollectorExporterConfigured

func (c *Config) IsACollectorExporterConfigured() bool

func (*Config) IsDirectoryAllowed

func (c *Config) IsDirectoryAllowed(directory string) bool

func (*Config) IsFeatureEnabled

func (c *Config) IsFeatureEnabled(feature string) bool

type DataPlaneConfig

type DataPlaneConfig struct {
	Nginx *NginxDataPlaneConfig `yaml:"-" mapstructure:"nginx"`
}

type DebugExporter

type DebugExporter struct{}

type DiskScraper

type DiskScraper struct{}

type Exporters

type Exporters struct {
	Debug              *DebugExporter      `yaml:"-" mapstructure:"debug"`
	PrometheusExporter *PrometheusExporter `yaml:"-" mapstructure:"prometheus_exporter"`
	OtlpExporters      []OtlpExporter      `yaml:"-" mapstructure:"otlp_exporters"`
}

type Extensions

type Extensions struct {
	Health        *Health        `yaml:"-" mapstructure:"health"`
	HeadersSetter *HeadersSetter `yaml:"-" mapstructure:"headers_setter"`
}

type File

type File struct {
	Location string `yaml:"-" mapstructure:"location"`
}

type FileWatcher

type FileWatcher struct {
	MonitoringFrequency time.Duration `yaml:"-" mapstructure:"monitoring_frequency"`
}

type FilesystemScraper

type FilesystemScraper struct{}

type GRPC

type GRPC struct {
	Target         string        `yaml:"-" mapstructure:"target"`
	ConnTimeout    time.Duration `yaml:"-" mapstructure:"connection_timeout"`
	MinConnTimeout time.Duration `yaml:"-" mapstructure:"minimum_connection_timeout"`
	BackoffDelay   time.Duration `yaml:"-" mapstructure:"backoff_delay"`
}
type Header struct {
	Action       string `yaml:"-" mapstructure:"action"`
	Key          string `yaml:"-" mapstructure:"key"`
	Value        string `yaml:"-" mapstructure:"value"`
	DefaultValue string `yaml:"-" mapstructure:"default_value"`
	FromContext  string `yaml:"-" mapstructure:"from_context"`
}

type HeadersSetter

type HeadersSetter struct {
	Headers []Header `yaml:"-" mapstructure:"headers"`
}

type Health

type Health struct {
	Server *ServerConfig `yaml:"-" mapstructure:"server"`
	TLS    *TLSConfig    `yaml:"-" mapstructure:"tls"`
	Path   string        `yaml:"-" mapstructure:"path"`
}

type HostMetrics

type HostMetrics struct {
	Scrapers           *HostMetricsScrapers `yaml:"-" mapstructure:"scrapers"`
	CollectionInterval time.Duration        `yaml:"-" mapstructure:"collection_interval"`
	InitialDelay       time.Duration        `yaml:"-" mapstructure:"initial_delay"`
}

type HostMetricsScrapers

type HostMetricsScrapers struct {
	CPU        *CPUScraper        `yaml:"-" mapstructure:"cpu"`
	Disk       *DiskScraper       `yaml:"-" mapstructure:"disk"`
	Filesystem *FilesystemScraper `yaml:"-" mapstructure:"filesystem"`
	Memory     *MemoryScraper     `yaml:"-" mapstructure:"memory"`
	Network    *NetworkScraper    `yaml:"-" mapstructure:"network"`
}

type InstanceHealthWatcher

type InstanceHealthWatcher struct {
	MonitoringFrequency time.Duration `yaml:"-" mapstructure:"monitoring_frequency"`
}

type InstanceWatcher

type InstanceWatcher struct {
	MonitoringFrequency time.Duration `yaml:"-" mapstructure:"monitoring_frequency"`
}

type Log

type Log struct {
	Level string `yaml:"-" mapstructure:"level"`
	Path  string `yaml:"-" mapstructure:"path"`
}

type MemoryScraper

type MemoryScraper struct{}

type NetworkScraper

type NetworkScraper struct{}

type NginxDataPlaneConfig

type NginxDataPlaneConfig struct {
	ExcludeLogs            []string      `yaml:"-" mapstructure:"exclude_logs"`
	ReloadMonitoringPeriod time.Duration `yaml:"-" mapstructure:"reload_monitoring_period"`
	TreatWarningsAsErrors  bool          `yaml:"-" mapstructure:"treat_warnings_as_errors"`
}

type NginxPlusReceiver

type NginxPlusReceiver struct {
	InstanceID string     `yaml:"-" mapstructure:"instance_id"`
	PlusAPI    APIDetails `yaml:"-" mapstructure:"api_details"`
}

type NginxReceiver

type NginxReceiver struct {
	InstanceID string      `yaml:"-" mapstructure:"instance_id"`
	StubStatus APIDetails  `yaml:"-" mapstructure:"api_details"`
	AccessLogs []AccessLog `yaml:"-" mapstructure:"access_logs"`
}

func (*NginxReceiver) Validate

func (nr *NginxReceiver) Validate(allowedDirectories []string) error

type Operator

type Operator struct {
	Fields map[string]string `yaml:"-" mapstructure:"fields"`
	Type   string            `yaml:"-" mapstructure:"type"`
}

There are many types of operators with different field names so we use a generic map to store the fields. See here for more info: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/README.md

type OtlpExporter

type OtlpExporter struct {
	Server        *ServerConfig `yaml:"-" mapstructure:"server"`
	TLS           *TLSConfig    `yaml:"-" mapstructure:"tls"`
	Compression   string        `yaml:"-" mapstructure:"compression"`
	Authenticator string        `yaml:"-" mapstructure:"authenticator"`
}

type OtlpReceiver

type OtlpReceiver struct {
	Server        *ServerConfig  `yaml:"-" mapstructure:"server"`
	Auth          *AuthConfig    `yaml:"-" mapstructure:"auth"`
	OtlpTLSConfig *OtlpTLSConfig `yaml:"-" mapstructure:"tls"`
}

type OtlpTLSConfig

type OtlpTLSConfig struct {
	Cert                   string `yaml:"-" mapstructure:"cert"`
	Key                    string `yaml:"-" mapstructure:"key"`
	Ca                     string `yaml:"-" mapstructure:"ca"`
	ServerName             string `yaml:"-" mapstructure:"server_name"`
	ExistingCert           bool   `yaml:"-"`
	SkipVerify             bool   `yaml:"-" mapstructure:"skip_verify"`
	GenerateSelfSignedCert bool   `yaml:"-" mapstructure:"generate_self_signed_cert"`
}

Specialized TLS configuration for OtlpReceiver with self-signed cert generation.

type Processors

type Processors struct {
	Attribute *Attribute `yaml:"-" mapstructure:"attribute"`
	Resource  *Resource  `yaml:"-" mapstructure:"resource"`
	Batch     *Batch     `yaml:"-" mapstructure:"batch"`
}

OTel Collector Processors configuration.

type PrometheusExporter

type PrometheusExporter struct {
	Server *ServerConfig `yaml:"-" mapstructure:"server"`
	TLS    *TLSConfig    `yaml:"-" mapstructure:"tls"`
}

type Receivers

type Receivers struct {
	HostMetrics        *HostMetrics        `yaml:"-" mapstructure:"host_metrics"`
	OtlpReceivers      []OtlpReceiver      `yaml:"-" mapstructure:"otlp_receivers"`
	NginxReceivers     []NginxReceiver     `yaml:"-" mapstructure:"nginx_receivers"`
	NginxPlusReceivers []NginxPlusReceiver `yaml:"-" mapstructure:"nginx_plus_receivers"`
	TcplogReceivers    []TcplogReceiver    `yaml:"-" mapstructure:"tcplog_receivers"`
}

OTel Collector Receiver configuration.

type Resource

type Resource struct {
	Attributes []ResourceAttribute `yaml:"-" mapstructure:"attributes"`
}

type ResourceAttribute

type ResourceAttribute struct {
	Key    string `yaml:"key"    mapstructure:"key"`
	Action string `yaml:"action" mapstructure:"action"`
	Value  string `yaml:"value"  mapstructure:"value"`
}

type ServerConfig

type ServerConfig struct {
	Host string     `yaml:"-" mapstructure:"host"`
	Port int        `yaml:"-" mapstructure:"port"`
	Type ServerType `yaml:"-" mapstructure:"type"`
}

type ServerType

type ServerType int
const (
	Grpc ServerType = iota + 1
)

type TLSConfig

type TLSConfig struct {
	Cert       string `yaml:"-" mapstructure:"cert"`
	Key        string `yaml:"-" mapstructure:"key"`
	Ca         string `yaml:"-" mapstructure:"ca"`
	ServerName string `yaml:"-" mapstructure:"server_name"`
	SkipVerify bool   `yaml:"-" mapstructure:"skip_verify"`
}

type TcplogReceiver

type TcplogReceiver struct {
	ListenAddress string     `yaml:"-" mapstructure:"listen_address"`
	Operators     []Operator `yaml:"-" mapstructure:"operators"`
}

type Watchers

type Watchers struct {
	InstanceWatcher       InstanceWatcher       `yaml:"-" mapstructure:"instance_watcher"`
	InstanceHealthWatcher InstanceHealthWatcher `yaml:"-" mapstructure:"instance_health_watcher"`
	FileWatcher           FileWatcher           `yaml:"-" mapstructure:"file_watcher"`
}

Jump to

Keyboard shortcuts

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