package etcd3
import "k8s.io/apiserver/pkg/storage/etcd3"
Index ¶
- func EtcdHealthCheck(data []byte) error
- func New(c *clientv3.Client, codec runtime.Codec, newFunc, newListFunc func() runtime.Object, prefix, resourcePrefix string, groupResource schema.GroupResource, transformer value.Transformer, leaseManagerConfig LeaseManagerConfig) storage.Interface
- func NewETCDLatencyTracker(delegate clientv3.KV) clientv3.KV
- func StartCompactor(ctx context.Context, client *clientv3.Client, compactInterval time.Duration)
- func TestOnlySetFatalOnDecodeError(b bool)
- type LeaseManagerConfig
Functions ¶
func EtcdHealthCheck ¶
EtcdHealthCheck decodes data returned from etcd /healthz handler. Deprecated: Validate health by passing storagebackend.Config directly to storagefactory.CreateProber.
func New ¶
func New(c *clientv3.Client, codec runtime.Codec, newFunc, newListFunc func() runtime.Object, prefix, resourcePrefix string, groupResource schema.GroupResource, transformer value.Transformer, leaseManagerConfig LeaseManagerConfig) storage.Interface
New returns an etcd3 implementation of storage.Interface.
func NewETCDLatencyTracker ¶
NewETCDLatencyTracker returns an implementation of clientv3.KV that times the calls from the specified 'delegate' KV instance in order to track latency incurred.
func StartCompactor ¶
StartCompactor starts a compactor in the background to compact old version of keys that's not needed. By default, we save the most recent 5 minutes data and compact versions > 5minutes ago. It should be enough for slow watchers and to tolerate burst. TODO: We might keep a longer history (12h) in the future once storage API can take advantage of past version of keys.
func TestOnlySetFatalOnDecodeError ¶
func TestOnlySetFatalOnDecodeError(b bool)
TestOnlySetFatalOnDecodeError should only be used for cases where decode errors are expected and need to be tested. e.g. conversion webhooks.
Types ¶
type LeaseManagerConfig ¶
type LeaseManagerConfig struct { // ReuseDurationSeconds specifies time in seconds that each lease is reused ReuseDurationSeconds int64 // MaxObjectCount specifies how many objects that a lease can attach MaxObjectCount int64 }
LeaseManagerConfig is configuration for creating a lease manager.
func NewDefaultLeaseManagerConfig ¶
func NewDefaultLeaseManagerConfig() LeaseManagerConfig
NewDefaultLeaseManagerConfig creates a LeaseManagerConfig with default values
Source Files ¶
compact.go errors.go event.go healthcheck.go latency_tracker.go lease_manager.go logger.go store.go watcher.go
Directories ¶
Path | Synopsis |
---|---|
pkg/storage/etcd3/metrics | |
pkg/storage/etcd3/preflight | |
pkg/storage/etcd3/testing | |
pkg/storage/etcd3/testing/testingcert | |
pkg/storage/etcd3/testserver |
- Version
- v0.30.8
- Published
- Dec 10, 2024
- Platform
- js/wasm
- Imports
- 39 packages
- Last checked
- 3 minutes ago –
Tools for package owners.