Documentation
¶
Index ¶
- func NewDecoder(us []*unstructured.Unstructured) decode.Decoder
- func NewDiscoveryClient(gvks ...schema.GroupVersionKind) discovery.ServerResourcer
- func NewErrorClient(err error) client.Client
- type Client
- func (c *Client) Applier() reconcile.Applier
- func (c *Client) Check(t *testing.T, wants ...client.Object)
- func (c *Client) Create(_ context.Context, obj client.Object, opts ...client.CreateOption) error
- func (c *Client) Delete(_ context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (c *Client) DeleteAllOf(_ context.Context, _ client.Object, _ ...client.DeleteAllOfOption) error
- func (c *Client) Get(_ context.Context, key client.ObjectKey, obj client.Object) error
- func (c *Client) List(_ context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (c *Client) Patch(ctx context.Context, obj client.Object, _ client.Patch, ...) error
- func (c *Client) RESTMapper() meta.RESTMapper
- func (c *Client) Scheme() *runtime.Scheme
- func (c *Client) Status() client.StatusWriter
- func (c *Client) Update(_ context.Context, obj client.Object, opts ...client.UpdateOption) error
- type ErrorClient
- func (e ErrorClient) Create(_ context.Context, _ client.Object, _ ...client.CreateOption) error
- func (e ErrorClient) Delete(_ context.Context, _ client.Object, _ ...client.DeleteOption) error
- func (e ErrorClient) DeleteAllOf(_ context.Context, _ client.Object, _ ...client.DeleteAllOfOption) error
- func (e ErrorClient) Get(_ context.Context, _ client.ObjectKey, _ client.Object) error
- func (e ErrorClient) List(_ context.Context, _ client.ObjectList, _ ...client.ListOption) error
- func (e ErrorClient) Patch(_ context.Context, _ client.Object, _ client.Patch, _ ...client.PatchOption) error
- func (e ErrorClient) RESTMapper() meta.RESTMapper
- func (e ErrorClient) Scheme() *runtime.Scheme
- func (e ErrorClient) Status() client.StatusWriter
- func (e ErrorClient) Update(_ context.Context, _ client.Object, _ ...client.UpdateOption) error
- type Event
- type EventRecorder
- func (e *EventRecorder) AnnotatedEventf(object runtime.Object, _ map[string]string, eventtype, reason, _ string, ...)
- func (e *EventRecorder) Check(t *testing.T, wantEvents ...Event)
- func (e *EventRecorder) Event(object runtime.Object, eventtype, reason, _ string)
- func (e *EventRecorder) Eventf(object runtime.Object, eventtype, reason, _ string, _ ...interface{})
- func (e *EventRecorder) PastEventf(object runtime.Object, _ v1.Time, eventtype, reason, _ string, ...)
- type RestartableManagerRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDecoder ¶
func NewDecoder(us []*unstructured.Unstructured) decode.Decoder
NewDecoder returns a new decoder.
func NewDiscoveryClient ¶
func NewDiscoveryClient(gvks ...schema.GroupVersionKind) discovery.ServerResourcer
NewDiscoveryClient returns a discoveryClient that reports types available to the API Server.
Does not report the scope of each GVK as no tests requiring a discoveryClient use scope information.
func NewErrorClient ¶
NewErrorClient returns a Client that always returns an error.
Types ¶
type Client ¶
Client is a fake implementation of client.Client.
func NewClient ¶
NewClient instantiates a new fake.Client pre-populated with the specified objects.
Calls t.Fatal if unable to properly instantiate Client.
func (*Client) Applier ¶
Applier returns a fake.Applier wrapping this fake.Client. Callers using the resulting Applier will read from/write to the original fake.Client.
func (*Client) Check ¶
Check reports an error to `t` if the passed objects in wants do not match the expected set of objects in the fake.Client, and only the passed updates to Status fields were recorded.
func (*Client) DeleteAllOf ¶
func (c *Client) DeleteAllOf(_ context.Context, _ client.Object, _ ...client.DeleteAllOfOption) error
DeleteAllOf implements client.Client.
func (*Client) List ¶
func (c *Client) List(_ context.Context, list client.ObjectList, opts ...client.ListOption) error
List implements client.Client.
Does not paginate results.
func (*Client) Patch ¶
func (c *Client) Patch(ctx context.Context, obj client.Object, _ client.Patch, opts ...client.PatchOption) error
Patch implements client.Client.
func (*Client) RESTMapper ¶
func (c *Client) RESTMapper() meta.RESTMapper
RESTMapper implements client.Client.
func (*Client) Status ¶
func (c *Client) Status() client.StatusWriter
Status implements client.Client.
type ErrorClient ¶
type ErrorClient struct {
// contains filtered or unexported fields
}
ErrorClient is a Client that always returns a specified error.
func (ErrorClient) Create ¶
func (e ErrorClient) Create(_ context.Context, _ client.Object, _ ...client.CreateOption) error
Create implements client.Client.
func (ErrorClient) Delete ¶
func (e ErrorClient) Delete(_ context.Context, _ client.Object, _ ...client.DeleteOption) error
Delete implements client.Client.
func (ErrorClient) DeleteAllOf ¶
func (e ErrorClient) DeleteAllOf(_ context.Context, _ client.Object, _ ...client.DeleteAllOfOption) error
DeleteAllOf implements client.Client.
func (ErrorClient) List ¶
func (e ErrorClient) List(_ context.Context, _ client.ObjectList, _ ...client.ListOption) error
List implements client.Client.
func (ErrorClient) Patch ¶
func (e ErrorClient) Patch(_ context.Context, _ client.Object, _ client.Patch, _ ...client.PatchOption) error
Patch implements client.Client.
func (ErrorClient) RESTMapper ¶
func (e ErrorClient) RESTMapper() meta.RESTMapper
RESTMapper implements client.Client.
func (ErrorClient) Scheme ¶
func (e ErrorClient) Scheme() *runtime.Scheme
Scheme implements client.Client.
func (ErrorClient) Status ¶
func (e ErrorClient) Status() client.StatusWriter
Status implements client.Client.
func (ErrorClient) Update ¶
func (e ErrorClient) Update(_ context.Context, _ client.Object, _ ...client.UpdateOption) error
Update implements client.Client.
type Event ¶
type Event struct { schema.GroupVersionKind client.ObjectKey EventType, Reason string }
Event represents a K8S Event that was emitted as result of the reconcile.
type EventRecorder ¶
type EventRecorder struct {
// contains filtered or unexported fields
}
EventRecorder tracks the set of events emitted as part of a Kubernetes reconcile.
func NewEventRecorder ¶
func NewEventRecorder(t *testing.T) *EventRecorder
NewEventRecorder initializes a new fake.EventRecorder.
func (*EventRecorder) AnnotatedEventf ¶
func (e *EventRecorder) AnnotatedEventf(object runtime.Object, _ map[string]string, eventtype, reason, _ string, _ ...interface{})
AnnotatedEventf implements record.EventRecorder.
func (*EventRecorder) Check ¶
func (e *EventRecorder) Check(t *testing.T, wantEvents ...Event)
Check ensures the EventRecorder got the correct set of updates to Syncs.
func (*EventRecorder) Event ¶
func (e *EventRecorder) Event(object runtime.Object, eventtype, reason, _ string)
Event implements record.EventRecorder.
func (*EventRecorder) Eventf ¶
func (e *EventRecorder) Eventf(object runtime.Object, eventtype, reason, _ string, _ ...interface{})
Eventf implements record.EventRecorder.
func (*EventRecorder) PastEventf ¶
func (e *EventRecorder) PastEventf(object runtime.Object, _ v1.Time, eventtype, reason, _ string, _ ...interface{})
PastEventf implements record.EventRecorder.
type RestartableManagerRecorder ¶
type RestartableManagerRecorder struct {
Restarts []bool
}
RestartableManagerRecorder records whether each instance of Restart was forced.
func (*RestartableManagerRecorder) Restart ¶
func (r *RestartableManagerRecorder) Restart(_ map[schema.GroupVersionKind]bool, force bool) (bool, error)
Restart implements watch.RestartableManager.