fake

package
v0.30.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 71

Documentation

Overview

Package fake has the automatically generated clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCoordinationV1

type FakeCoordinationV1 struct {
	*testing.Fake
}

func (*FakeCoordinationV1) Leases

func (c *FakeCoordinationV1) Leases(namespace string) v1.LeaseInterface

func (*FakeCoordinationV1) RESTClient

func (c *FakeCoordinationV1) RESTClient() rest.Interface

RESTClient returns a RESTClient that is used to communicate with API server by this client implementation.

type FakeLeases

type FakeLeases struct {
	Fake *FakeCoordinationV1
	// contains filtered or unexported fields
}

FakeLeases implements LeaseInterface

func (*FakeLeases) Apply added in v0.21.0

func (c *FakeLeases) Apply(ctx context.Context, lease *coordinationv1.LeaseApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Lease, err error)

Apply takes the given apply declarative configuration, applies it and returns the applied lease.

func (*FakeLeases) Create

func (c *FakeLeases) Create(ctx context.Context, lease *v1.Lease, opts metav1.CreateOptions) (result *v1.Lease, err error)

Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any.

func (*FakeLeases) Delete

func (c *FakeLeases) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error

Delete takes name of the lease and deletes it. Returns an error if one occurs.

func (*FakeLeases) DeleteCollection

func (c *FakeLeases) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*FakeLeases) Get

func (c *FakeLeases) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Lease, err error)

Get takes name of the lease, and returns the corresponding lease object, and an error if there is any.

func (*FakeLeases) List

func (c *FakeLeases) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LeaseList, err error)

List takes label and field selectors, and returns the list of Leases that match those selectors.

func (*FakeLeases) Patch

func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Lease, err error)

Patch applies the patch and returns the patched lease.

func (*FakeLeases) Update

func (c *FakeLeases) Update(ctx context.Context, lease *v1.Lease, opts metav1.UpdateOptions) (result *v1.Lease, err error)

Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any.

func (*FakeLeases) Watch

Watch returns a watch.Interface that watches the requested leases.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL