options

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 13 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
	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

ApplyTo fills up config with options

func (*CollectorOptions) Config

type MockOptions added in v0.4.0

type MockOptions struct {
	NamespaceCount int
	WorkloadCount  int
	PodCount       int
}

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

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
	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

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