Documentation ¶
Index ¶
- func Creation(ctx context.Context, host *provider.HostClient, pool dynamic.ClientPool, ...) (*unstructured.Unstructured, error)
- func Deletion(ctx context.Context, host *provider.HostClient, pool dynamic.ClientPool, ...) error
- func Read(ctx context.Context, host *provider.HostClient, pool dynamic.ClientPool, ...) (*unstructured.Unstructured, error)
- func Update(ctx context.Context, host *provider.HostClient, pool dynamic.ClientPool, ...) (*unstructured.Unstructured, error)
- type AggregatedError
- type InitializationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Creation ¶
func Creation( ctx context.Context, host *provider.HostClient, pool dynamic.ClientPool, disco discovery.ServerResourcesInterface, urn resource.URN, obj *unstructured.Unstructured, ) (*unstructured.Unstructured, error)
Creation (as the usage, `await.Creation`, implies) will block until one of the following is true: (1) the Kubernetes resource is reported to be initialized; (2) the initialization timeout has occurred; or (3) an error has occurred while the resource was being initialized.
func Deletion ¶
func Deletion( ctx context.Context, host *provider.HostClient, pool dynamic.ClientPool, disco discovery.DiscoveryInterface, gvk schema.GroupVersionKind, namespace, name string, ) error
Deletion (as the usage, `await.Deletion`, implies) will block until one of the following is true: (1) the Kubernetes resource is reported to be deleted; (2) the initialization timeout has occurred; or (3) an error has occurred while the resource was being deleted.
func Read ¶ added in v0.15.0
func Read( ctx context.Context, host *provider.HostClient, pool dynamic.ClientPool, disco discovery.ServerResourcesInterface, urn resource.URN, obj *unstructured.Unstructured, ) (*unstructured.Unstructured, error)
Read checks a resource, returning the object if it was created and initialized successfully.
func Update ¶
func Update( ctx context.Context, host *provider.HostClient, pool dynamic.ClientPool, disco discovery.CachedDiscoveryInterface, urn resource.URN, lastSubmitted, currentSubmitted *unstructured.Unstructured, ) (*unstructured.Unstructured, error)
Update takes `lastSubmitted` (the last version of a Kubernetes API object submitted to the API server) and `currentSubmitted` (the version of the Kubernetes API object being submitted for an update currently) and blocks until one of the following is true: (1) the Kubernetes resource is reported to be updated; (2) the update timeout has occurred; or (3) an error has occurred while the resource was being updated.
Update updates an existing resource with new values. Currently this client supports the Kubernetes-standard three-way JSON patch. See references here[1] and here[2].
nolint [1]: https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/#use-a-json-merge-patch-to-update-a-deployment [2]: https://kubernetes.io/docs/concepts/overview/object-management-kubectl/declarative-config/#how-apply-calculates-differences-and-merges-changes
Types ¶
type AggregatedError ¶ added in v0.15.0
type AggregatedError interface {
SubErrors() []string
}
AggregatedError represents an error with 0 or more sub-errors.
type InitializationError ¶ added in v0.15.0
type InitializationError interface {
Object() *unstructured.Unstructured
}
InitializationError represents an object that was successfully created, but which failed to be initialized.