apiextensions-apiserver: k8s.io/apiextensions-apiserver/test/integration/storage Index | Files

package storage

import "k8s.io/apiextensions-apiserver/test/integration/storage"

Index

Package Files

objectreader.go

func GetEtcdClients Uses

func GetEtcdClients(config storagebackend.TransportConfig) (*clientv3.Client, clientv3.KV, error)

GetEtcdClients returns an initialized clientv3.Client and clientv3.KV.

type EtcdObjectReader Uses

type EtcdObjectReader struct {
    // contains filtered or unexported fields
}

EtcdObjectReader provides direct access to custom resource objects stored in etcd.

func NewEtcdObjectReader Uses

func NewEtcdObjectReader(etcdClient *clientv3.Client, restOptions *generic.RESTOptions, crd *apiextensionsv1.CustomResourceDefinition) *EtcdObjectReader

NewEtcdObjectReader creates a reader for accessing custom resource objects directly from etcd.

func (*EtcdObjectReader) GetStoredCustomResource Uses

func (s *EtcdObjectReader) GetStoredCustomResource(ns, name string) (*unstructured.Unstructured, error)

GetStoredCustomResource gets the storage representation of a custom resource from etcd.

func (*EtcdObjectReader) SetStoredCustomResource Uses

func (s *EtcdObjectReader) SetStoredCustomResource(ns, name string, obj *unstructured.Unstructured) error

SetStoredCustomResource writes the storage representation of a custom resource to etcd.

func (*EtcdObjectReader) WaitForStorageVersion Uses

func (s *EtcdObjectReader) WaitForStorageVersion(version string, ns, name string, timeout time.Duration, updateObjFn func()) error

WaitForStorageVersion calls the updateObjFn periodically and waits for the version of the custom resource stored in etcd to be set to the provided version. Typically updateObjFn should perform a noop update to the object so that when stored version of a CRD changes, the object is written at the updated storage version. If the timeout is exceeded a error is returned. This is useful when updating the stored version of an existing CRD because the update does not take effect immediately.

Package storage imports 12 packages (graph). Updated 2019-08-31. Refresh now. Tools for package owners.