config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIHost          string `yaml:"apiHost"`
	WriteKey         string `yaml:"writekey"`
	Watchers         []*WatcherConfig
	Verbosity        string
	LegacyLogPaths   bool                   `yaml:"legacyLogPaths"`
	SplitLogging     bool                   `yaml:"splitLogging"`
	AdditionalFields map[string]interface{} `yaml:"additionalFields"`
}

func ReadFromFile

func ReadFromFile(filePath string) (*Config, error)

type ParserConfig

type ParserConfig struct {
	Name    string
	Options map[string]interface{}
}

func (*ParserConfig) UnmarshalYAML

func (p *ParserConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

type WatcherConfig

type WatcherConfig struct {
	Parser    *ParserConfig
	Dataset   string
	Namespace string
	// Distinguish between nil and empty string in the LabelSelector
	// nil means watch no pods, empty string means watch all of them
	// Maybe we need a better API? But k8s is pretty insistent that empty
	// string means "select all pods".
	LabelSelector *string  `yaml:"labelSelector"`
	FilePaths     []string `yaml:"paths"`
	ContainerName string   `yaml:"containerName"`
	Processors    []map[string]map[string]interface{}
}

Jump to

Keyboard shortcuts

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