config

package
v7.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CloudflareMinStart = time.Minute * 5

Variables

View Source
var DefaultCommonConfig = CommonConfig{

	Margin:           time.Minute * 1,
	Backoff:          time.Second * 30,
	NewestAllowed:    time.Minute * 10,
	OldestAllowed:    time.Minute * 120,
	PullInterval:     time.Minute * 5,
	MaxPullSize:      time.Minute * 60,
	PullOffset:       newBool(true),
	EdgeResponseTime: newBool(true),
}
View Source
var DefaultConfig = Config{
	RegistryFile:    "registry",
	ShutdownTimeout: 10,
	CommonConfig:    DefaultCommonConfig,
}

Functions

This section is empty.

Types

type CommonConfig

type CommonConfig struct {
	ApiEmail         *string       `config:"api_email"`
	ApiKey           *string       `config:"api_key"`
	Organization     *string       `config:"organization"`
	Fields           []string      `config:"fields"`
	MaxPullSize      time.Duration `config:"max_pull_size"`
	PullInterval     time.Duration `config:"pull_interval"`
	OldestAllowed    time.Duration `config:"oldest_allowed"`
	NewestAllowed    time.Duration `config:"newest_allowed"`
	Margin           time.Duration `config:"margin"`
	Backoff          time.Duration `config:"backoff"`
	PullOffset       *bool         `config:"pull_offset_enabled"`
	EdgeResponseTime *bool         `config:"edge_response_time"`
}

type Config

type Config struct {
	RegistryFile    string                `config:"registry_file"`
	RegistryFlush   time.Duration         `config:"registry_flush"`
	ShutdownTimeout time.Duration         `config:"shutdown_timeout"`
	ConsumerGroups  []ConsumerGroupConfig `config:"consumers"`
	CommonConfig    `config:",inline"`
}

func Read

func Read(b *beat.Beat, rawConfig *common.Config) (*Config, error)

type ConsumerGroupConfig

type ConsumerGroupConfig struct {
	Title        string   `config:"title"`
	Zones        []string `config:"zones"`
	CommonConfig `config:",inline"`
}

Jump to

Keyboard shortcuts

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