Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeClient ¶
type FakeClient struct { ctrlclient.WithWatch // contains filtered or unexported fields }
FakeClient implements the sigs.k8s.io/controller-runtime/pkg/client.WithWatch interface. This client keeps track of all seen objects and returns them as a []unstructured.Unstructured slice via the Objects method.
func NewFakeClient ¶
func NewFakeClient(upstreamClient ctrlclient.WithWatch, scheme *runtime.Scheme, opts ...FakeClientOption) *FakeClient
func (*FakeClient) Objects ¶
func (c *FakeClient) Objects() ([]unstructured.Unstructured, error)
type FakeClientOption ¶
type FakeClientOption interface {
// contains filtered or unexported methods
}
func WithInitObjects ¶
func WithInitObjects(initObjs ...ctrlclient.Object) FakeClientOption
WithInitObjects keeps tracks of initObjs objects before the client is even used.
Click to show internal directories.
Click to hide internal directories.