types

package
v0.0.2-0...-4ce78c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExcludeAtMatch = "exclude_at_match"
	IncludeAtMatch = "include_at_match"
	MaskSequences  = "mask_sequences"
	MultiLine      = "multi_line"
)

Processing rule types

Variables

This section is empty.

Functions

func CompileProcessingRules

func CompileProcessingRules(rules []*ProcessingRule) error

CompileProcessingRules compiles all processing rule regular expressions.

func ValidateProcessingRules

func ValidateProcessingRules(rules []*ProcessingRule) error

ValidateProcessingRules validates the rules and raises an error if one is misconfigured. Each processing rule must have: - a valid name - a valid type - a valid pattern that compiles

Types

type Endpoint

type Endpoint struct {
	APIKey                  string        `yaml:"apiKey"`
	Host                    string        `yaml:"host"`
	Port                    int           `yaml:"port"`
	UseSSL                  bool          `yaml:"useSSL"`
	UseCompression          bool          `yaml:"useCompression"`
	CompressionLevel        int           `yaml:"compressionLevel"`
	ProxyAddress            string        `yaml:"proxyAddress"`
	ConnectionResetInterval time.Duration `yaml:"connectionResetInterval"`
}

Endpoint holds all the organization and network parameters to send logs to Datadog.

type Endpoints

type Endpoints struct {
	Main                   Endpoint
	Additionals            []Endpoint
	UseProto               bool
	UseHTTP                bool
	BatchWait              time.Duration
	BatchMaxConcurrentSend int
}

Endpoints holds the main endpoint and additional ones to dualship logs.

func NewEndpoints

func NewEndpoints(main Endpoint, additionals []Endpoint, useProto bool, useHTTP bool, batchWait time.Duration, batchMaxConcurrentSend int) *Endpoints

NewEndpoints returns a new endpoints composite.

type ProcessingRule

type ProcessingRule struct {
	Type               string `yaml:"type"`
	Name               string `yaml:"name"`
	ReplacePlaceholder string `yaml:"replacePlaceholder" json:"replacePlaceholder"`
	Pattern            string `yaml:"pattern"`
	// TODO: should be moved out
	Regex       *regexp.Regexp
	Placeholder []byte
}

ProcessingRule defines an exclusion or a masking rule to be applied on log lines

Jump to

Keyboard shortcuts

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