client

package
v0.0.0-...-5853c50 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2016 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

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
	client.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