cfg

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: BSD-2-Clause-Views Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAggregation added in v1.2.1

func InitAggregation(table table.Interface, config Config) error

func InitBlocklist added in v1.2.1

func InitBlocklist(table table.Interface, config Config) error

func InitCmd added in v1.2.1

func InitCmd(table table.Interface, config Config) error

func InitRewrite added in v1.2.1

func InitRewrite(table table.Interface, config Config) error

func InitRoutes added in v1.2.1

func InitRoutes(table table.Interface, config Config, meta toml.MetaData) error

func InitTable added in v1.2.1

func InitTable(table table.Interface, config Config, meta toml.MetaData) error

Types

type Aggregation

type Aggregation struct {
	Function  string
	Regex     string
	NotRegex  string
	Prefix    string
	NotPrefix string
	Substr    string
	Sub       string
	NotSub    string
	Format    string
	Cache     bool
	Interval  int
	Wait      int
	DropRaw   bool
}

type Amqp

type Amqp struct {
	Amqp_enabled   bool
	Amqp_host      string
	Amqp_port      int
	Amqp_vhost     string
	Amqp_user      string
	Amqp_password  string
	Amqp_exchange  string
	Amqp_queue     string
	Amqp_key       string
	Amqp_durable   bool
	Amqp_exclusive bool
}

type Config

type Config struct {
	Listen_addr             string
	Plain_read_timeout      Duration
	Pickle_addr             string
	Pickle_read_timeout     Duration
	Admin_addr              string
	Http_addr               string
	Spool_dir               string
	Amqp                    Amqp
	Max_procs               int
	First_only              bool
	Init                    Init
	Instance                string
	Log_level               string
	Instrumentation         instrumentation
	Bad_metrics_max_age     string
	Pid_file                string
	Validation_level_legacy validate.LevelLegacy
	Validation_level_m20    validate.LevelM20
	Validate_order          bool
	BlackList               []string // support legacy configs
	BlockList               []string
	Aggregation             []Aggregation
	Route                   []Route
	Rewriter                []Rewriter
}

func NewConfig

func NewConfig() Config

func (Config) TableConfig added in v1.2.1

func (c Config) TableConfig() (table.TableConfig, error)

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

type Init

type Init struct {
	Cmds []string
}

type Rewriter

type Rewriter struct {
	Old string
	New string
	Not string
	Max int
}

type Route

type Route struct {
	Key          string
	Type         string
	Prefix       string
	NotPrefix    string
	Substr       string
	Sub          string
	NotSub       string
	Regex        string
	NotRegex     string
	Destinations []string

	// grafanaNet & kafkaMdm & Google PubSub
	SchemasFile  string
	OrgId        int
	BufSize      int
	FlushMaxNum  int // also used by CloudWatch
	FlushMaxWait int // also used by CloudWatch
	Timeout      int
	Blocking     bool

	// grafanaNet
	Addr             string
	AggregationFile  string
	ApiKey           string
	Spool            bool
	SslVerify        bool
	Concurrency      int
	ErrBackoffMin    int
	ErrBackoffFactor float64

	// kafkaMdm
	Brokers       []string
	Topic         string // also used by Google PubSub
	Codec         string // also used by Google PubSub
	PartitionBy   string
	TLSEnabled    bool
	TLSSkipVerify bool
	TLSClientCert string
	TLSClientKey  string
	SASLEnabled   bool
	SASLMechanism string
	SASLUsername  string
	SASLPassword  string

	// Google PubSub
	Project      string
	Format       string
	FlushMaxSize int

	// CloudWatch
	Profile           string // For local development
	Region            string
	Namespace         string     // For now fixed in config
	Dimensions        [][]string // For now fixed in config
	StorageResolution int64
}

Jump to

Keyboard shortcuts

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