clientbuilder

package
v0.0.0-...-35c3564 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerClientBuilder

type ControllerClientBuilder interface {
	Config(name string) (*restclient.Config, error)
	ConfigOrDie(name string) *restclient.Config
	Client(name string) (clientset.Interface, error)
	ClientOrDie(name string) clientset.Interface
	DiscoveryClient(name string) (discovery.DiscoveryInterface, error)
	DiscoveryClientOrDie(name string) discovery.DiscoveryInterface
	FireflyClient(name string) (fireflyversioned.Interface, error)
	FireflyClientOrDie(name string) fireflyversioned.Interface
}

ControllerClientBuilder allows you to get clients and configs for controllers Please note a copy also exists in staging/src/k8s.io/cloud-provider/cloud.go TODO: Extract this into a separate controller utilities repo (issues/68947)

type SimpleControllerClientBuilder

type SimpleControllerClientBuilder struct {
	// ClientConfig is a skeleton config to clone and use as the basis for each controller client
	ClientConfig *restclient.Config
}

SimpleControllerClientBuilder returns a fixed client with different user agents

func (SimpleControllerClientBuilder) Client

Client returns a clientset.Interface built from the ClientBuilder

func (SimpleControllerClientBuilder) ClientOrDie

ClientOrDie returns a clientset.interface built from the ClientBuilder with no error. If it gets an error getting the client, it will log the error and kill the process it's running in.

func (SimpleControllerClientBuilder) Config

Config returns a client config for a fixed client

func (SimpleControllerClientBuilder) ConfigOrDie

ConfigOrDie returns a client config if no error from previous config func. If it gets an error getting the client, it will log the error and kill the process it's running in.

func (SimpleControllerClientBuilder) DiscoveryClient

DiscoveryClient returns a discovery.DiscoveryInterface built from the ClientBuilder Discovery is special because it will artificially pump the burst quite high to handle the many discovery requests.

func (SimpleControllerClientBuilder) DiscoveryClientOrDie

DiscoveryClientOrDie returns a discovery.DiscoveryInterface built from the ClientBuilder with no error. Discovery is special because it will artificially pump the burst quite high to handle the many discovery requests. If it gets an error getting the client, it will log the error and kill the process it's running in.

func (SimpleControllerClientBuilder) FireflyClient

FireflyClient returns a fireflyversioned.Interface built from the ClientBuilder

func (SimpleControllerClientBuilder) FireflyClientOrDie

FireflyClientOrDie returns a fireflyversioned.interface built from the ClientBuilder with no error. If it gets an error getting the client, it will log the error and kill the process it's running in.

Jump to

Keyboard shortcuts

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