clients

package
v0.0.0-...-c1ead0e Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 37 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetScheme

func SetScheme(crScheme *runtime.Scheme) error

SetScheme returns mutated apiClient's scheme.

Types

type SchemeAttacher

type SchemeAttacher func(*runtime.Scheme) error

SchemeAttacher represents a function that can modify the clients current schemes.

type Settings

Settings provides the struct to talk with relevant API.

func GetModifiableTestClients

func GetModifiableTestClients(tcp TestClientParams) (*Settings, *fakeRuntimeClient.ClientBuilder)

GetModifiableTestClients returns a fake clientset and a modifiable clientbuilder for testing.

func GetTestClients

func GetTestClients(tcp TestClientParams) *Settings

GetTestClients returns a fake clientset for testing.

func New

func New(kubeconfig string) *Settings

New returns a *Settings with the given kubeconfig.

func (*Settings) AttachScheme

func (settings *Settings) AttachScheme(attacher SchemeAttacher) error

AttachScheme attaches a scheme to the client's current scheme.

func (*Settings) GetAPIClient

func (settings *Settings) GetAPIClient() (*Settings, error)

GetAPIClient implements the cluster.APIClientGetter interface.

type TestClientParams

type TestClientParams struct {
	K8sMockObjects  []runtime.Object
	GVK             []schema.GroupVersionKind
	SchemeAttachers []SchemeAttacher
}

TestClientParams provides the struct to store the parameters for the test client.

Jump to

Keyboard shortcuts

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