options

package
v0.3.9-2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Options    CloudMonOptions
	SubOptions SubCloudMonOptions
)

Functions

func GetArgumentParser

func GetArgumentParser() (*structarg.ArgumentParser, error)

Types

type CloudMonOptions

type CloudMonOptions struct {
	common_options.CommonOptions
	ReportOptions

	EndpointType string `default:"internalURL" help:"Defaults to internalURL" choices:"publicURL|internalURL|adminURL"`
	ApiVersion   string `help:"override default modules service api version"`

	ReqTimeout int    `default:"600" help:"Number of seconds to wait for a response"`
	Insecure   bool   `default:"true" help:"Allow skip server cert verification if URL is https" short-token:"k"`
	CertFile   string `help:"certificate file"`
	KeyFile    string `help:"private key file"`

	InfluxDatabase string `help:"influxdb database name, default telegraf" default:"telegraf"`
}

type PingProbeOptions

type PingProbeOptions struct {
	Debug         bool `help:"debug"`
	ProbeCount    int  `help:"probe count, default is 3" default:"3"`
	TimeoutSecond int  `help:"probe timeout in second, default is 1 second" default:"1"`

	DisablePingProbe bool `help:"enable ping probe"`
}

type ReportOptions

type ReportOptions struct {
	Batch                      int   `help:"batch"`
	Count                      int   `help:"count" json:"count"`
	CloudproviderSyncInterval  int64 `help:"CloudproviderSyncInterval unit:minute" default:"30"`
	AlertRecordHistoryInterval int64 `help:"AlertRecordHistoryInterval unit:day"  default:"1"`
	// 定时执行间隔,同时也会影响metric拉取间隔
	Interval  string   `help:"interval" default:"6" unit:"minute"`
	Timeout   int64    `help:"command timeout unit:second" default:"10"`
	SinceTime string   `help:"sinceTime"`
	EndTime   string   `help:"endTime"`
	Provider  []string `` /* 164-byte string literal not displayed */

	MetricInterval string `help:"metric interval eg:PT1M"`
	PingProbeOptions
}

type SubCloudMonOptions

type SubCloudMonOptions struct {
	CloudMonOptions
	Subcommand string `help:"climc subcommand" subcommand:"true"`
}

Jump to

Keyboard shortcuts

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