config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Input struct {
		Kafka KafkaConf
	}
	Filters []Filter `json:",optional"`
	Output  struct {
		ElasticSearch ElasticSearchConf
	}
}

type Condition

type Condition struct {
	Key   string
	Value string
	Type  string `json:",default=match,options=match|contains"`
	Op    string `json:",default=and,options=and|or"`
}

type Config

type Config struct {
	Clusters    []Cluster
	GracePeriod time.Duration `json:",default=10s"`
}

type ElasticSearchConf

type ElasticSearchConf struct {
	Hosts         []string
	Index         string
	DocType       string `json:",default=doc"`
	TimeZone      string `json:",optional"`
	MaxChunkBytes int    `json:",default=15728640"` // default 15M
	Compress      bool   `json:",default=false"`
	Username      string `json:",optional"`
	Password      string `json:",optional"`
}

type Filter

type Filter struct {
	Action     string      `json:",options=drop|remove_field|transfer"`
	Conditions []Condition `json:",optional"`
	Fields     []string    `json:",optional"`
	Field      string      `json:",optional"`
	Target     string      `json:",optional"`
}

type KafkaConf

type KafkaConf struct {
	service.ServiceConf
	Brokers    []string
	Group      string
	Topics     []string
	Offset     string `json:",options=first|last,default=last"`
	Conns      int    `json:",default=1"`
	Consumers  int    `json:",default=8"`
	Processors int    `json:",default=8"`
	MinBytes   int    `json:",default=10240"`    // 10K
	MaxBytes   int    `json:",default=10485760"` // 10M
	Username   string `json:",optional"`
	Password   string `json:",optional"`
}

Jump to

Keyboard shortcuts

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