Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOutputVerifier ¶ added in v0.19.4
func NewOutputVerifier(
ctx context.Context,
cfg *rest.Config,
options map[schema.GroupVersionKind]ServerVerifyOption,
) *outputVerifier
func NewVerifier ¶
func NewVerifier(
ctx context.Context,
options map[schema.GroupVersionKind]ServerVerifyOption,
) *verifier
Types ¶
type OutputResourceVerifier ¶ added in v0.19.4
type OutputResourceVerifier interface {
// VerifyServerResource verifies whether the API server for the given rest.Config supports the resource with the given GVK.
// For the "local/management" cluster, set cluster to ""
// Note that once a resource has been verified, the result will be cached for subsequent calls.
// Returns true if the resource is registered, false otherwise.
// an error will be returned if the ErrorIfNotPresent option is selected for the given GVK
VerifyServerResource(cluster string, gvk schema.GroupVersionKind) (bool, error)
}
ServerResourceVerifier verifies whether a given cluster server supports a given resource.
type ServerResourceVerifier ¶
type ServerResourceVerifier interface {
// VerifyServerResource verifies whether the API server for the given rest.Config supports the resource with the given GVK.
// For the "local/management" cluster, set cluster to ""
// Note that once a resource has been verified, the result will be cached for subsequent calls.
// Returns true if the resource is registered, false otherwise.
// an error will be returned if the ErrorIfNotPresent option is selected for the given GVK
VerifyServerResource(cluster string, cfg *rest.Config, gvk schema.GroupVersionKind) (bool, error)
}
ServerResourceVerifier verifies whether a given cluster server supports a given resource.
type ServerVerifyOption ¶
type ServerVerifyOption int
ServerVerifyOption is used to specify one of several options on whether and how to verify the resource's availabiltiy on the API server
const (
// skip verifying whether a resource is for a kind before reading it from the API server
ServerVerifyOption_SkipVerify ServerVerifyOption = iota
// return an error if the resource does not exist for a kind before reading it from the API server
ServerVerifyOption_ErrorIfNotPresent
// log a warning (and continue) if the resource does not exist for a kind before reading it from the API server
// the reconcile loop will not be started if the server resource is not supported.
ServerVerifyOption_WarnIfNotPresent
// write a debug log (and continue) if the resource does not exist for a kind before reading it from the API server
// the reconcile loop will not be started if the server resource is not supported.
ServerVerifyOption_LogDebugIfNotPresent
// ignore error (and continue) if the resource does not exist for a kind before reading it from the API server.
// the reconcile loop will not be started if the server resource is not supported.
ServerVerifyOption_IgnoreIfNotPresent
)
Click to show internal directories.
Click to hide internal directories.