options

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	WorkModeProvider     = "provider"
	WorkModeCollector    = "collect"
	WorkModeStoreServing = "storeServer"
)
View Source
const (
	CustomMetricsCollectorNamePrometheus = "prometheus-collector"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorOptions

type CollectorOptions struct {
	PodLabelSelector  string
	NodeLabelSelector string

	ShardNum        int
	CollectorName   string
	CollectInterval time.Duration
}

CollectorOptions holds the configurations for katalyst metrics collectors.

func NewCollectorOptions

func NewCollectorOptions() *CollectorOptions

NewCollectorOptions creates a new CollectorOptions with a default config.

func (*CollectorOptions) AddFlags

func (o *CollectorOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*CollectorOptions) ApplyTo

ApplyTo fills up config with options

func (*CollectorOptions) Config

type Options

Options holds the configurations for katalyst metrics module.

func NewOptions

func NewOptions() *Options

NewOptions creates a new Options with a default config.

func (*Options) AddFlags

func (o *Options) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*Options) ApplyTo

func (o *Options) ApplyTo(c *config.Configuration) error

ApplyTo fills up config with options

func (*Options) Config

func (o *Options) Config() (*config.Configuration, error)

type ProviderOptions

type ProviderOptions struct {
	// since we use the wrapped tools in custom-metrics-api-server,
	// use all the flags in it (to connect with APIServer)
	AdapterBase *basecmd.AdapterBase
}

ProviderOptions holds the configurations for katalyst metrics module.

func NewProviderOptions

func NewProviderOptions() *ProviderOptions

NewProviderOptions creates a new ProviderOptions with a default config.

func (*ProviderOptions) AddFlags

func (o *ProviderOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*ProviderOptions) ApplyTo

ApplyTo fills up config with options

func (*ProviderOptions) Config

type StoreOptions

type StoreOptions struct {
	StoreName string

	StoreServerShardCount   int
	StoreServerReplicaTotal int
	StoreServerSelector     string
}

StoreOptions holds the configurations for katalyst metrics stores.

func NewStoreOptions

func NewStoreOptions() *StoreOptions

NewStoreOptions creates a new StoreOptions with a default config.

func (*StoreOptions) AddFlags

func (o *StoreOptions) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags to the specified FlagSet.

func (*StoreOptions) ApplyTo

ApplyTo fills up config with options

func (*StoreOptions) Config

func (o *StoreOptions) Config() (*metric.StoreConfiguration, error)

Jump to

Keyboard shortcuts

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