modulepackage
0.0.0-20231228040228-cf28542fa2c6
Repository: https://github.com/henderiw/resource.git
Documentation: pkg.go.dev
# README
resource
A library with k8s resource helpers
# Functions
AddFinalizer to the supplied k8s object's metadata.
FinalizerExists checks whether a certain finalizer is already set on the aupplied object.
No description provided by the author
No description provided by the author
No description provided by the author
IgnoreAny ignores errors that satisfy any of the supplied ErrorIs functions by returning nil.
IgnoreNotFound returns the supplied error, or nil if the error indicates a Kubernetes resource was not found.
No description provided by the author
NewAPIFinalizer returns a new APIFinalizer.
NewAPIPatchingApplicator returns an Applicator that applies changes to an object by either creating or patching it in a Kubernetes API server.
NewMockClient returns a MockClient that does nothing when its methods are called.
NewMockCreateFn returns a MockCreateFn that returns the supplied error.
NewMockDeleteAllOfFn returns a MockDeleteAllOfFn that returns the supplied error.
NewMockDeleteFn returns a MockDeleteFn that returns the supplied error.
NewMockGetFn returns a MockGetFn that returns the supplied error.
NewMockListFn returns a MockListFn that returns the supplied error.
NewMockPatchFn returns a MockPatchFn that returns the supplied error.
NewMockSchemeFn returns a MockSchemeFn that returns the scheme.
NewMockSubResourceCreateFn returns a MockSubResourceCreateFn that returns the supplied error.
NewMockSubResourcePatchFn returns a MockSubResourcePatchFn that returns the supplied error.
NewMockSubResourceUpdateFn returns a MockSubResourceUpdateFn that returns the supplied error.
NewMockUpdateFn returns a MockUpdateFn that returns the supplied error.
RemoveFinalizer from the supplied k8s object's metadata.
UpdateFn returns an ApplyOption that is used to modify the current object to match fields of the desired.
# Structs
An APIFinalizer manages the lifecycle of a finalizer on a k8s object.
An APIPatchingApplicator applies changes to an object by either creating or patching it in a Kubernetes API server.
A ClientApplicator may be used to build a single 'client' that satisfies both client.Client and Applicator.
MockClient implements controller-runtime's Client interface, allowing each method to be overridden for testing.
MockSubResourceClient provides mock functionality for status sub-resource.
# Interfaces
An Applicator applies changes to an object.
Finalizer manages the lifecycle of the finalizer on a k8s object.
No description provided by the author
# Type aliases
An ApplyFn is a function that satisfies the Applicator interface.
An ApplyOption is called before patching the current object to match the desired object.
No description provided by the author
A MockCreateFn is used to mock client.Client's Create implementation.
A MockDeleteAllOfFn is used to mock client.Client's Delete implementation.
A MockDeleteFn is used to mock client.Client's Delete implementation.
A MockGetFn is used to mock client.Client's Get implementation.
A MockListFn is used to mock client.Client's List implementation.
A MockPatchFn is used to mock client.Client's Patch implementation.
A MockSchemeFn is used to mock client.Client's Scheme implementation.
A MockSubResourceCreateFn is used to mock client.SubResourceClient's create implementation.
A MockSubResourceGetFn is used to mock client.SubResourceClient's get implementation.
A MockSubResourcePatchFn is used to mock client.SubResourceClient's patch implementation.
A MockSubResourceUpdateFn is used to mock client.SubResourceClient's update implementation.
A MockUpdateFn is used to mock client.Client's Update implementation.
An ObjectFn operates on the supplied Object.
An ObjectListFn operates on the supplied ObjectList.