Documentation ¶
Index ¶
Constants ¶
const ( WorkModeProvider = "provider" WorkModeCollector = "collect" WorkModeStoreServing = "storeServer" )
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 ¶
func (o *CollectorOptions) ApplyTo(c *metric.CollectorConfiguration) error
ApplyTo fills up config with options
func (*CollectorOptions) Config ¶
func (o *CollectorOptions) Config() (*metric.CollectorConfiguration, error)
type Options ¶
type Options struct { *options.GenericOptions election.LeaderElectionConfiguration WorkMode []string OutOfDataPeriod time.Duration *StoreOptions *ProviderOptions *CollectorOptions }
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.
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 ¶
func (o *ProviderOptions) ApplyTo(c *metric.ProviderConfiguration) error
ApplyTo fills up config with options
func (*ProviderOptions) Config ¶
func (o *ProviderOptions) Config() (*metric.ProviderConfiguration, error)
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 ¶
func (o *StoreOptions) ApplyTo(c *metric.StoreConfiguration) error
ApplyTo fills up config with options
func (*StoreOptions) Config ¶
func (o *StoreOptions) Config() (*metric.StoreConfiguration, error)