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 CredentialPath string }
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 MockOptions ¶ added in v0.4.0
MockOptions holds the configurations for katalyst metrics mock data.It's only for pressure test.
func NewMockOptions ¶ added in v0.4.0
func NewMockOptions() *MockOptions
NewMockOptions creates a new MockOptions with a default config.
func (*MockOptions) AddFlags ¶ added in v0.4.0
func (o *MockOptions) AddFlags(fss *cliflag.NamedFlagSets)
AddFlags adds flags to the specified FlagSet.
func (*MockOptions) ApplyTo ¶ added in v0.4.0
func (o *MockOptions) ApplyTo(c *metric.MockConfiguration) error
ApplyTo fills up config with options
type Options ¶
type Options struct { *options.GenericOptions election.LeaderElectionConfiguration WorkMode []string OutOfDataPeriod time.Duration *MockOptions *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 GCInterval time.Duration PurgeInterval time.Duration IndexLabelKeys []string StoreServerShardCount int StoreServerReplicaTotal int ServiceDiscoveryName string SDPodSelector string SDServiceNamespace string SDServiceName 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)