client

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2016 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTransport

func MakeTransport(config *KubeletClientConfig) (http.RoundTripper, error)

Types

type ConnectionInfoGetter

type ConnectionInfoGetter interface {
	GetConnectionInfo(ctx api.Context, nodeName string) (scheme string, port uint, transport http.RoundTripper, err error)
}

type FakeKubeletClient

type FakeKubeletClient struct{}

FakeKubeletClient is a fake implementation of KubeletClient which returns an error when called. It is useful to pass to the master in a test configuration with no kubelets.

func (FakeKubeletClient) GetConnectionInfo

func (c FakeKubeletClient) GetConnectionInfo(ctx api.Context, nodeName string) (string, uint, http.RoundTripper, error)

type HTTPKubeletClient

type HTTPKubeletClient struct {
	Client *http.Client
	Config *KubeletClientConfig
}

HTTPKubeletClient is the default implementation of KubeletHealthchecker, accesses the kubelet over HTTP.

func (*HTTPKubeletClient) GetConnectionInfo

func (c *HTTPKubeletClient) GetConnectionInfo(ctx api.Context, nodeName string) (string, uint, http.RoundTripper, error)

In default HTTPKubeletClient ctx is unused.

type KubeletClient

type KubeletClient interface {
	ConnectionInfoGetter
}

KubeletClient is an interface for all kubelet functionality

func NewStaticKubeletClient

func NewStaticKubeletClient(config *KubeletClientConfig) (KubeletClient, error)

TODO: this structure is questionable, it should be using client.Config and overriding defaults.

type KubeletClientConfig

type KubeletClientConfig struct {
	// Default port - used if no information about Kubelet port can be found in Node.NodeStatus.DaemonEndpoints.
	Port        uint
	EnableHttps bool

	// TLSClientConfig contains settings to enable transport layer security
	restclient.TLSClientConfig

	// Server requires Bearer authentication
	BearerToken string

	// HTTPTimeout is used by the client to timeout http requests to Kubelet.
	HTTPTimeout time.Duration

	// Dial is a custom dialer used for the client
	Dial func(net, addr string) (net.Conn, error)
}

Jump to

Keyboard shortcuts

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