agent

package
v0.0.0-...-683a7b2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigPrefix = "agent"

ConfigPrefix define configuration prefix

Functions

This section is empty.

Types

type Agent

type Agent interface {
	manager.Component
}

Client represents the agent interface

func New

func New(opts ...Option) (Agent, error)

New creates a new agent instance

type Option

type Option func(*Options)

Option func

func Frequency

func Frequency(v time.Duration) Option

Frequency option

func KubeFile

func KubeFile(v path.Path) Option

KubeFile option

func KubeInCluster

func KubeInCluster(v bool) Option

KubeInCluster option

func Logger

func Logger(v logger.Logger) Option

Logger option

func Namespaces

func Namespaces(v []string) Option

Namespaces option

type Options

type Options struct {
	Logger logger.Logger `ignored:"true" json:"-"`

	KubeInCluster bool      `default:"true" envconfig:"in_cluster"`
	KubeFile      path.Path `default:"" envconfig:"file"`

	Frequency time.Duration `default:"3s" envconfig:"frequency"`

	Namespaces []string `default:"default" envconfig:"namespaces"`
}

Options represents the list of options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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