client

package
v0.0.0-...-f8abdcd Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientConfig

func GetClientConfig(kubeConfigFile string, overrides *ClientConnectionOverrides) (*rest.Config, error)

GetClientConfig returns the rest.Config for a kubeconfig file

func GetKubeConfigOrInClusterConfig

func GetKubeConfigOrInClusterConfig(kubeConfigFile string, overrides *ClientConnectionOverrides) (*rest.Config, error)

GetKubeConfigOrInClusterConfig loads in-cluster config if kubeConfigFile is empty or the file if not, then applies overrides.

Types

type ClientConnectionOverrides

type ClientConnectionOverrides struct {
	configv1.ClientConnectionOverrides

	// MaxIdleConnsPerHost, if non-zero, controls the maximum idle (keep-alive) connections to keep per-host:port.
	// If zero, DefaultMaxIdleConnsPerHost is used.
	// TODO roll this into the connection overrides in api
	MaxIdleConnsPerHost int
}

ClientConnectionOverrides allows overriding values for rest.Config not held in a kubeconfig. Most commonly used for QPS. Empty values are not used.

type ClientTransportOverrides

type ClientTransportOverrides struct {
	WrapTransport       func(rt http.RoundTripper) http.RoundTripper
	MaxIdleConnsPerHost int
}

func (ClientTransportOverrides) DefaultClientTransport

func (c ClientTransportOverrides) DefaultClientTransport(rt http.RoundTripper) http.RoundTripper

defaultClientTransport sets defaults for a client Transport that are suitable for use by infrastructure components.

Jump to

Keyboard shortcuts

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