config

package
v0.0.0-...-0f49ba3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultESHostPort      = "elasticsearch:20042"
	DefaultSyslogDirectory = "/var/log/deepflow-agent"
)
View Source
const (
	DEFAULT_SYNC_INTERVAL = 10 * time.Second
	DEFAULT_PUSH_INTERVAL = 2 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterConfig

type AdapterConfig struct {
	OrderingCacheSize uint32 `yaml:"ordering-cache-size"`
}

type Config

type Config struct {
	Base            *config.Config
	ESHostPorts     []string      `yaml:"es-host-port"`
	ESAuth          ESAuth        `yaml:"es-auth"`
	Adapter         AdapterConfig `yaml:"adapter"`
	Labeler         LabelerConfig `yaml:"labeler"`
	Queue           QueueConfig   `yaml:"queue"`
	RpcTimeout      time.Duration `yaml:"rpc-timeout"`
	PCap            PCapConfig    `yaml:"pcap"`
	AgentLogToFile  bool          `yaml:"agent-log-to-file"`
	SyslogDirectory string        `yaml:"syslog-directory"`
	ESSyslog        bool          `yaml:"es-syslog"`
}

func Load

func Load(base *config.Config, path string) *Config

func (*Config) Validate

func (c *Config) Validate() error

type ConfigSynchronizer

type ConfigSynchronizer interface {
	Start()
	Stop()
	Register(Handler)
}

func NewRpcConfigSynchronizer

func NewRpcConfigSynchronizer(ips []net.IP, port uint16, timeout time.Duration, maxMsgSize int) ConfigSynchronizer

type DropletConfig

type DropletConfig struct {
	Droplet Config `yaml:"ingester"`
}

type ESAuth

type ESAuth struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

type Handler

type Handler func(*trident.SyncResponse, *RpcInfoVersions)

type LabelerConfig

type LabelerConfig struct {
	FastPathDisable bool   `yaml:"fast-path-disable"`
	MapSizeLimit    uint32 `yaml:"map-size-limit"`
	Level           int    `yaml:"level"`
}

type PCapConfig

type PCapConfig struct {
	TCPIPChecksum         bool   `yaml:"tcpip-checksum"`
	BlockSizeKB           int    `yaml:"block-size-kb"`
	MaxConcurrentFiles    int    `yaml:"max-concurrent-files"`
	MaxFileSizeMB         int    `yaml:"max-file-size-mb"`
	MaxFilePeriodSecond   int    `yaml:"max-file-period-second"`
	MaxDirectorySizeGB    int    `yaml:"max-directory-size-gb"`
	DiskFreeSpaceMarginGB int    `yaml:"disk-free-space-margin-gb"`
	FileDirectory         string `yaml:"file-directory"`
}

type QueueConfig

type QueueConfig struct {
	PacketQueueCount    int `yaml:"packet-queue-count"`
	PacketQueueSize     int `yaml:"packet-queue-size"`
	SyslogQueueSize     int `yaml:"syslog-queue-size"`
	StatsdQueueSize     int `yaml:"statsd-queue-size"`
	CompressedQueueSize int `yaml:"compressed-queue-size"`
}

type RpcConfigSynchronizer

type RpcConfigSynchronizer struct {
	sync.Mutex
	PollingSession grpc.GrpcSession

	RpcInfoVersions
	// contains filtered or unexported fields
}

func (*RpcConfigSynchronizer) Register

func (s *RpcConfigSynchronizer) Register(handler Handler)

func (*RpcConfigSynchronizer) Start

func (s *RpcConfigSynchronizer) Start()

func (*RpcConfigSynchronizer) Stop

func (s *RpcConfigSynchronizer) Stop()

type RpcInfoVersions

type RpcInfoVersions struct {
	VersionPlatformData uint64
	VersionAcls         uint64
	VersionGroups       uint64
}

Jump to

Keyboard shortcuts

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