options

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsAddrFlag             = "metrics-addr"
	PprofAddrFlag               = "pprof-addr"
	HealthProbeAddrFlag         = "health-probe-addr"
	EnableLeaderElectionFlag    = "enable-leader-election"
	EnablePprofFlag             = "enable-pprof"
	ProbeMasterAddrFalg         = "probe-master-addr"
	ClusterNameFalg             = "cluster-name"
	LeaderElectionNamespaceFlag = "leader-election-namespace"
	NamespaceFlag               = "namespace"
	ProbeStatusReportUrlFalg    = "probestatus-report-url"
	ProbeListenAddrFalg         = "probe-listen-addr"
	DebugLevelFalg              = "debug-level"
	ConfigFileFalg              = "config-file"
)

Variables

View Source
var ProbeAgentConf = NewProbeAgentOptions()

Functions

This section is empty.

Types

type ProbeAgentOptions

type ProbeAgentOptions struct {
	MetricsAddr             string `mapstructure:"metrics_addr" yaml:"metrics_addr"`
	PprofAddr               string `mapstructure:"pprof_addr" yaml:"pprof_addr"`
	HealthProbeAddr         string `mapstructure:"health_probe_addr" yaml:"health_probe_addr"`
	EnableLeaderElection    bool   `mapstructure:"enable_leader_election" yaml:"enable_leader_election"`
	EnablePprof             bool   `mapstructure:"enable_pprof" yaml:"enable_pprof"`
	LeaderElectionNamespace string `mapstructure:"leader_election_namespace" yaml:"leader_election_namespace"`
	LeaderElectionID        string `mapstructure:"leader_election_id" yaml:"leader_election_id"`
	Namespace               string `mapstructure:"namespace" yaml:"namespace"`
	ProbeMasterAddr         string `mapstructure:"probe_master_addr" yaml:"probe_master_addr"`
	ClusterName             string `mapstructure:"cluster_name" yaml:"cluster_name"`
	ProbeStatusReportUrl    string `mapstructure:"probe_status_report_url" yaml:"probe_status_report_url"`
	ProbeListenAddr         string `mapstructure:"probe_listen_addr" yaml:"probe_listen_addr"`
	DebugLevel              int8   `mapstructure:"debug_level" yaml:"debug_level"`
	ConfigFile              string
}

func NewProbeAgentOptions

func NewProbeAgentOptions() *ProbeAgentOptions

NewProbeAgentOptions creates a new NewProbeAgentOptions with a default config.

func (*ProbeAgentOptions) AddFlags

func (o *ProbeAgentOptions) AddFlags(fs *pflag.FlagSet)

AddFlags returns flags for a specific yurthub by section name

func (ProbeAgentOptions) GetNamespace

func (o ProbeAgentOptions) GetNamespace() string

func (ProbeAgentOptions) GetProbeStatusReportUrl

func (o ProbeAgentOptions) GetProbeStatusReportUrl() string

func (*ProbeAgentOptions) LoadConfig

func (o *ProbeAgentOptions) LoadConfig() error

func (*ProbeAgentOptions) ValidateOptions

func (o *ProbeAgentOptions) ValidateOptions() error

ValidateOptions validates YurtAppOptions

Jump to

Keyboard shortcuts

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