config

package
v0.0.0-...-97dfe3f Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRegex

func BuildRegex(cfg YamlConfig) *regexp.Regexp

Builds Regex specified in configuration

Types

type ConnectorConfig

type ConnectorConfig interface {
	// contains filtered or unexported methods
}

type KafkaConnectorConfig

type KafkaConnectorConfig struct {
	Name   string   `yaml:"Name"`
	Type   string   `yaml:"Type"`
	Host   string   `yaml:"Host"`
	Port   string   `yaml:"Port"`
	Topic  string   `yaml:"Topic"`
	Levels []string `yaml:"Levels"`
}

Kafka connector configuration

type PatternConfig

type PatternConfig struct {
	Name    string `yaml:"Name"`
	Pattern string `yaml:"Pattern"`
}

type RollbarConnectorConfig

type RollbarConnectorConfig struct {
	Name   string   `yaml:"Name"`
	Type   string   `yaml:"Type"`
	Url    string   `yaml:"Url"`
	Levels []string `yaml:"Levels"`
}

Rollbar connector configuration

type S3ConnectorConfig

type S3ConnectorConfig struct {
	Name      string   `yaml:"Name"`
	Endpoint  string   `yaml:"Endpoint"`
	KeyPrefix string   `yaml:"KeyPrefix"`
	Bucket    string   `yaml:"Bucket"`
	Region    string   `yaml:"Region"`
	Type      string   `yaml:"Type"`
	Levels    []string `yaml:"Levels"`
}

S3 connector configuration

type YamlConfig

type YamlConfig struct {
	ConfigName        string                   `yaml:"ConfigName"`
	Directory         string                   `yaml:"Directory"`
	LogPattern        string                   `yaml:"LogPattern"`
	Definitions       []PatternConfig          `yaml:"Definitions"`
	S3Connectors      []S3ConnectorConfig      `yaml:"S3Connectors"`
	RollbarConnectors []RollbarConnectorConfig `yaml:"RollbarConnectors"`
	KafkaConnectors   []KafkaConnectorConfig   `yaml:"KafkaConnectors"`
}

YAML configuration structs

func ValidateAndLoadConfig

func ValidateAndLoadConfig(path *string) YamlConfig

Core function parsing, validating and returning YAML config

Jump to

Keyboard shortcuts

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