Documentation
¶
Index ¶
- Constants
- func BuildTypeMap(kc client.Client, gvks ...schema.GroupVersionKind) (map[schema.GroupVersionKind]schema.GroupVersionKind, error)
- func CreateOrPatch(ctx context.Context, c client.Client, obj client.Object, ...) (kutil.VerbType, error)
- func GetForGVK(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, ...) (client.Object, error)
- func GetForGVR(ctx context.Context, c client.Client, gvr schema.GroupVersionResource, ...) (client.Object, error)
- func GetServiceAccountTokenSecret(kc client.Client, sa client.ObjectKey) (*core.Secret, error)
- func NewAutoConvertClient(gvks ...schema.GroupVersionKind) client.NewClientFunc
- func NewClient(config *restclient.Config, options client.Options) (client.Client, error)
- func NewDelegatingClient(in NewDelegatingClientInput) (client.Client, error)
- func NewRetryClient(d client.Client) client.Client
- func NewRetryClientWithOptions(d client.Client, interval time.Duration, timeout time.Duration) client.Client
- func NewUncachedClient(cfg *rest.Config, funcs ...func(*runtime.Scheme) error) (client.Client, error)
- func PatchStatus(ctx context.Context, c client.Client, obj client.Object, ...) (kutil.VerbType, error)
- type DelegatingClient
- func (d *DelegatingClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
- func (d *DelegatingClient) Impersonate(u user.Info) (*restclient.Config, client.Client, error)
- func (d *DelegatingClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
- func (d *DelegatingClient) RESTMapper() meta.RESTMapper
- func (d *DelegatingClient) RestConfig() *restclient.Config
- func (d *DelegatingClient) Scheme() *runtime.Scheme
- func (d *DelegatingClient) SubResource(subResource string) client.SubResourceClient
- type NewDelegatingClientInput
- type TransformFunc
- type TransformStatusFunc
Constants ¶
View Source
const (
RetryTimeout = 10 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func BuildTypeMap ¶ added in v0.29.0
func BuildTypeMap(kc client.Client, gvks ...schema.GroupVersionKind) (map[schema.GroupVersionKind]schema.GroupVersionKind, error)
func CreateOrPatch ¶
func GetServiceAccountTokenSecret ¶ added in v0.25.36
func NewAutoConvertClient ¶ added in v0.29.0
func NewAutoConvertClient(gvks ...schema.GroupVersionKind) client.NewClientFunc
func NewDelegatingClient ¶
func NewDelegatingClient(in NewDelegatingClientInput) (client.Client, error)
NewDelegatingClient creates a new delegating client.
A delegating client forms a Client by composing separate reader, writer and statusclient interfaces. This way, you can have an Client that reads from a cache and writes to the API server.
func NewRetryClientWithOptions ¶ added in v0.30.12
func NewUncachedClient ¶
func PatchStatus ¶
Types ¶
type DelegatingClient ¶ added in v0.30.38
type DelegatingClient struct { client.Reader client.Writer client.StatusClient client.SubResourceClientConstructor // contains filtered or unexported fields }
func (*DelegatingClient) GroupVersionKindFor ¶ added in v0.30.38
func (d *DelegatingClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
GroupVersionKindFor returns the GroupVersionKind for the given object.
func (*DelegatingClient) Impersonate ¶ added in v0.30.38
func (d *DelegatingClient) Impersonate(u user.Info) (*restclient.Config, client.Client, error)
func (*DelegatingClient) IsObjectNamespaced ¶ added in v0.30.38
func (d *DelegatingClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
IsObjectNamespaced returns true if the GroupVersionKind of the object is namespaced.
func (*DelegatingClient) RESTMapper ¶ added in v0.30.38
func (d *DelegatingClient) RESTMapper() meta.RESTMapper
RESTMapper returns the rest mapper this client is using.
func (*DelegatingClient) RestConfig ¶ added in v0.30.38
func (d *DelegatingClient) RestConfig() *restclient.Config
func (*DelegatingClient) Scheme ¶ added in v0.30.38
func (d *DelegatingClient) Scheme() *runtime.Scheme
Scheme returns the scheme this client is using.
func (*DelegatingClient) SubResource ¶ added in v0.30.38
func (d *DelegatingClient) SubResource(subResource string) client.SubResourceClient
type NewDelegatingClientInput ¶
type NewDelegatingClientInput struct { CacheReader client.Reader Client client.Client UncachedObjects []client.Object CacheUnstructured bool Cachable apiutil2.Cachable // contains filtered or unexported fields }
NewDelegatingClientInput encapsulates the input parameters to create a new delegating client.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.