options

package
v0.2.0-alpha.12 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseWatchCacheSizes

func ParseWatchCacheSizes(cacheSizes []string) (map[schema.GroupResource]int, error)

ParseWatchCacheSizes turns a list of cache size values into a map of group resources to requested sizes.

Types

type ETCDClientOptions

type ETCDClientOptions struct {
	// Prefix is the prefix to all keys passed to storage.Interface methods.
	Prefix string
	// ServerList is the list of storage servers to connect with.
	ServerList []string
	// TLS credentials
	KeyFile  string
	CertFile string
	CAFile   string
	// Paging indicates whether the server implementation should allow paging (if it is
	// supported). This is generally configured by feature gating, or by a specific
	// resource type not wishing to allow paging, and is not intended for end users to
	// set.
	Paging bool
	Codec  runtime.Codec
	// EncodeVersioner is the same groupVersioner used to build the
	// storage encoder. Given a list of kinds the input object might belong
	// to, the EncodeVersioner outputs the gvk the object will be
	// converted to before persisted in etcd.
	EncodeVersioner runtime.GroupVersioner
	// Transformer allows the value to be transformed prior to persisting into etcd.
	Transformer value.Transformer
	// CompactionInterval is an interval of requesting compaction from apiserver.
	// If the value is 0, no compaction will be issued.
	CompactionInterval time.Duration
	// CountMetricPollPeriod specifies how often should count metric be updated
	CountMetricPollPeriod time.Duration
}

ETCDClientOptions contains the options that storage backend by etcd.

func NewETCDClientOptions

func NewETCDClientOptions(defaultETCDPathPrefix string) *ETCDClientOptions

NewETCDClientOptions creates a Options object with default parameters.

func (*ETCDClientOptions) AddFlags

func (o *ETCDClientOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for log to the specified FlagSet object.

func (*ETCDClientOptions) ApplyFlags

func (o *ETCDClientOptions) ApplyFlags() []error

ApplyFlags parsing parameters from the command line or configuration file to the options instance.

func (*ETCDClientOptions) NewClient

func (o *ETCDClientOptions) NewClient() (*clientv3.Client, error)

NewClient creates the etcd v3 client object and returns it.

func (*ETCDClientOptions) NewHealthCheck

func (o *ETCDClientOptions) NewHealthCheck() (func() error, error)

NewHealthCheck creates the health check callback by given backend config.

type ETCDStorageOptions

type ETCDStorageOptions struct {
	*ETCDClientOptions
	ETCDServersOverrides             []string
	EncryptionProviderConfigFilePath string

	// To enable protobuf as storage format, it is enough
	// to set it to "application/vnd.kubernetes.protobuf".
	DefaultStorageMediaType string
	DeleteCollectionWorkers int
	EnableGarbageCollection bool

	// Set EnableWatchCache to false to disable all watch caches
	EnableWatchCache bool
	// Set DefaultWatchCacheSize to zero to disable watch caches for those resources that have no explicit cache size
	// set
	DefaultWatchCacheSize int
	// WatchCacheSizes represents override to a given resource
	WatchCacheSizes []string
}

ETCDStorageOptions contains the options that storage backend by etcd.

func NewETCDStorageOptions

func NewETCDStorageOptions(defaultETCDPathPrefix string) *ETCDStorageOptions

NewETCDStorageOptions creates a Options object with default parameters.

func (*ETCDStorageOptions) AddFlags

func (o *ETCDStorageOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for log to the specified FlagSet object.

func (*ETCDStorageOptions) ApplyFlags

func (o *ETCDStorageOptions) ApplyFlags() []error

ApplyFlags parsing parameters from the command line or configuration file to the options instance.

func (*ETCDStorageOptions) ApplyWithStorageFactoryTo

func (o *ETCDStorageOptions) ApplyWithStorageFactoryTo(factory serverstorage.StorageFactory, c *genericapiserver.Config) error

ApplyWithStorageFactoryTo apply storage factory by etcd storage options.

type StorageFactoryRESTOptionsFactory

type StorageFactoryRESTOptionsFactory struct {
	Options        ETCDStorageOptions
	StorageFactory serverstorage.StorageFactory
}

StorageFactoryRESTOptionsFactory wrap the storage factory.

func (*StorageFactoryRESTOptionsFactory) GetRESTOptions

GetRESTOptions return the rest options.

Jump to

Keyboard shortcuts

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