client

package
Version: v0.0.0-...-dab26bb Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: Apache-2.0 Imports: 6 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 {
	// AcceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
	// default value of 'application/json'. This field will control all connections to the server used by a particular
	// client.
	AcceptContentTypes string
	// ContentType is the content type used when sending data to the server from this client.
	ContentType string

	// QPS controls the number of queries per second allowed for this connection.
	QPS float32
	// Burst allows extra queries to accumulate when a client is exceeding its rate.
	Burst int32

	// MaxIdleConnsPerHost, if non-zero, controls the maximum idle (keep-alive) connections to keep per-host:port.
	// If zero, DefaultMaxIdleConnsPerHost is used.
	MaxIdleConnsPerHost int
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL