config

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost    = "localhost" // DefaultHost is default address where discovery will look for Kubelet API.
	DefaultPort    = 10250       // DefaultPort is default port user for Kubelet API.
	DefaultTimeout = 5000        // Default timeout of 5 seconds in miliseconds
	DefaultRetries = 5           // Default retries to 5

	FlagHost           = "host"
	FlagNamespaces     = "namespaces"
	FlagPort           = "port"
	FlagInsecure       = "insecure"
	FlagTimeout        = "timeout"
	FlagRetries        = "retries"
	FlagTLS            = "tls"
	FlagKubeConfigFile = "kubeconfig"
	FlagClusterName    = "cluster_name"
	FlagNodeName       = "node_name"
)

Variables

View Source
var (
	ErrClusterNameNotSet = errors.New("cluster name is not set")
)

Functions

func IsFlagPassed added in v1.3.0

func IsFlagPassed(name string) bool

IsFlagPassed checks if a particular command line argument was provided or not.

Types

type Config

type Config struct {
	Namespaces     []string
	Port           int
	Host           string
	TLS            bool
	Timeout        int
	Retries        int
	KubeConfigFile string
	ClusterName    string
	NodeName       string
}

Config defined the currently accepted configuration parameters of the Discoverer.

func NewConfig

func NewConfig(version string) (*Config, error)

NewConfig generates Config from flags.

Jump to

Keyboard shortcuts

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