Help us shape the future of Go! Take the 2026 Go Developer Survey

commands

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfigDefaults added in v0.18.0

func ApplyConfigDefaults(clientCfg *client.Config) error

ApplyConfigDefaults applies config file defaults to a client.Config Config file values are used as defaults if the field is empty Precedence: CLI flags/Env vars > --context flag > current-context > Defaults

func GetConfig added in v0.18.0

func GetConfig() *config.Config

GetConfig returns the global configuration

func SetConfig added in v0.18.0

func SetConfig(cfg *config.Config, contextName string)

SetConfig sets the global configuration and optional context override for all commands to use

Types

type AccessControlCommand

type AccessControlCommand struct {
	InstanceID string
	ACLs       []string
}

AccessControlCommand is the kingpin command for ACLs.

func (*AccessControlCommand) Register

func (a *AccessControlCommand) Register(app *kingpin.Application)

Register is used to register the command to a parent command.

type AlertCommand

type AlertCommand struct {
	CortexURL      string
	IgnoreString   string
	IgnoreAlerts   map[string]interface{}
	SourceLabel    string
	NumSources     int
	GracePeriod    int
	CheckFrequency int
	ClientConfig   client.Config
	// contains filtered or unexported fields
}

AlertCommand configures and executes rule related PromQL queries for alerts comparison.

func (*AlertCommand) Register

func (a *AlertCommand) Register(app *kingpin.Application)

type AlertmanagerCommand

type AlertmanagerCommand struct {
	ClientConfig           client.Config
	AlertmanagerURL        url.URL
	AlertmanagerConfigFile string
	TemplateFiles          []string
	DisableColor           bool
	// contains filtered or unexported fields
}

AlertmanagerCommand configures and executes rule related cortex api operations

func (*AlertmanagerCommand) Register

func (a *AlertmanagerCommand) Register(app *kingpin.Application)

Register rule related commands and flags with the kingpin application

type AnalyseCommand

type AnalyseCommand struct {
}

func (*AnalyseCommand) Register

func (cmd *AnalyseCommand) Register(app *kingpin.Application)

type BlockGenCommand

type BlockGenCommand struct {
	Replicas int                `yaml:"replicas"`
	Series   []bench.SeriesDesc `yaml:"series"`
	Cfg      BlockGenConfig     `yaml:"block_gen"`
	// contains filtered or unexported fields
}

BlockGenCommand is the kingpin command to generate blocks of mock data.

func (*BlockGenCommand) Register

func (f *BlockGenCommand) Register(app *kingpin.Application)

Register is used to register the command to a parent command.

type BlockGenConfig

type BlockGenConfig struct {
	Interval  time.Duration `yaml:"interval"`
	BlockSize time.Duration `yaml:"block_size"`
	BlockDir  string        `yaml:"block_dir"`
	MinT      int64         `yaml:"min_t"`
	MaxT      int64         `yaml:"max_t"`
}

type BucketValidationCommand

type BucketValidationCommand struct {
	// contains filtered or unexported fields
}

BucketValidationCommand is the kingpin command for bucket validation.

func (*BucketValidationCommand) Register

func (b *BucketValidationCommand) Register(app *kingpin.Application)

Register is used to register the command to a parent command.

type ConfigCommand added in v0.18.0

type ConfigCommand struct {
	// contains filtered or unexported fields
}

ConfigCommand handles config file management

func (*ConfigCommand) Register added in v0.18.0

func (c *ConfigCommand) Register(app *kingpin.Application, configPath *string)

Register config command and its subcommands

type DashboardAnalyseCommand

type DashboardAnalyseCommand struct {
	DashFilesList []string
	// contains filtered or unexported fields
}

type GrafanaAnalyseCommand

type GrafanaAnalyseCommand struct {
	// contains filtered or unexported fields
}

type LoadgenCommand

type LoadgenCommand struct {
	// contains filtered or unexported fields
}

func (*LoadgenCommand) Register

func (c *LoadgenCommand) Register(app *kingpin.Application)

type LoggerConfig

type LoggerConfig struct {
	Level string
}

func (*LoggerConfig) Register

func (l *LoggerConfig) Register(app *kingpin.Application)

Register configures log related flags

type PrometheusAnalyseCommand

type PrometheusAnalyseCommand struct {
	// contains filtered or unexported fields
}

type PushGatewayConfig

type PushGatewayConfig struct {
	Endpoint *url.URL
	JobName  string
	Interval time.Duration
	// contains filtered or unexported fields
}

PushGatewayConfig configures the pushgateway

func (*PushGatewayConfig) Register

func (l *PushGatewayConfig) Register(app *kingpin.Application)

Register configures log related flags

func (*PushGatewayConfig) Stop

func (l *PushGatewayConfig) Stop()

Stop shutsdown the pushgateway

type RemoteReadCommand

type RemoteReadCommand struct {
	// contains filtered or unexported fields
}

func (*RemoteReadCommand) Register

func (c *RemoteReadCommand) Register(app *kingpin.Application)

type RuleCommand

type RuleCommand struct {
	ClientConfig client.Config

	// Get Rule Groups Configs
	Namespace string
	RuleGroup string

	// Load Rules Config
	RuleFilesList []string
	RuleFiles     string
	RuleFilesPath string

	// Sync/Diff Rules Config
	Namespaces string

	IgnoredNamespaces string

	// Prepare Rules Config
	InPlaceEdit                        bool
	AggregationLabel                   string
	AggregationLabelExcludedRuleGroups string

	// Lint Rules Config
	LintDryRun bool

	// Rules check flags
	Strict bool

	// List Rules Config
	Format string

	DisableColor bool

	// Diff Rules Config
	Verbose bool
	// contains filtered or unexported fields
}

RuleCommand configures and executes rule related cortex operations

func (*RuleCommand) Register

func (r *RuleCommand) Register(app *kingpin.Application)

Register rule related commands and flags with the kingpin application

type RuleFileAnalyseCommand

type RuleFileAnalyseCommand struct {
	RuleFilesList []string
	// contains filtered or unexported fields
}

type RulerAnalyseCommand

type RulerAnalyseCommand struct {
	ClientConfig client.Config
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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