getter

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTransport

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

MakeTransport return a tranport for http

Types

type ClientConfig

type ClientConfig struct {
	// Default port - used if no information about klusterlet port can be found in Node.NodeStatus.DaemonEndpoints.
	Port uint
	// EnableHTTPS enable https
	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 klusterlet.
	HTTPTimeout time.Duration

	// Dial is a custom dialer used for the client
	Dial utilnet.DialFunc

	// DynamicClient is the kube client
	DynamicClient dynamic.Interface

	// CertDir is the directory to put cert
	CertDir string
}

ClientConfig is to define the configuration to connect klusterlet

type ClusterConnectionInfoGetter

type ClusterConnectionInfoGetter struct {
	// contains filtered or unexported fields
}

ClusterConnectionInfoGetter obtains connection info from the status of a Node API object

func (*ClusterConnectionInfoGetter) GetConnectionInfo

func (k *ClusterConnectionInfoGetter) GetConnectionInfo(ctx context.Context, clusterName string) (*ConnectionInfo, error)

GetConnectionInfo return the connection into to klusterlet

type ClusterGetter

type ClusterGetter interface {
	Get(ctx context.Context, name string, options metav1.GetOptions) (*v1beta1.ManagedClusterInfo, error)
}

ClusterGetter defines an interface for looking up a cluster by name

type ClusterGetterFunc

type ClusterGetterFunc func(ctx context.Context, name string, options metav1.GetOptions) (*v1beta1.ManagedClusterInfo, error)

ClusterGetterFunc allows implementing NodeGetter with a function

func (ClusterGetterFunc) Get

Get defines a cluster getter function

type ConnectionInfo

type ConnectionInfo struct {
	Scheme    string
	Hostname  string
	IP        string
	Port      string
	Transport http.RoundTripper
	UserRoot  bool
	UseID     bool
}

ConnectionInfo provides the information needed to connect to a kubelet

type ConnectionInfoGetter

type ConnectionInfoGetter interface {
	GetConnectionInfo(ctx context.Context, clusterName string) (*ConnectionInfo, error)
}

ConnectionInfoGetter provides ConnectionInfo for the kubelet running on a named node

func NewClusterConnectionInfoGetter

func NewClusterConnectionInfoGetter(clusters ClusterGetter, config ClientConfig) (ConnectionInfoGetter, error)

NewClusterConnectionInfoGetter is a getter to get cluster status

func NewLogConnectionInfoGetter

func NewLogConnectionInfoGetter(clientConfig ClientConfig) (ConnectionInfoGetter, error)

type ProxyServiceInfo

type ProxyServiceInfo struct {
	Name             string
	SubResource      string
	ServiceName      string
	ServiceNamespace string
	ServicePort      string
	RootPath         string
	UseID            bool
	RestConfig       *rest.Config
}

type ProxyServiceInfoGetter

type ProxyServiceInfoGetter struct {
	// contains filtered or unexported fields
}

func NewProxyServiceInfoGetter

func NewProxyServiceInfoGetter() *ProxyServiceInfoGetter

func (*ProxyServiceInfoGetter) Add

func (g *ProxyServiceInfoGetter) Add(proxyServiceInfo *ProxyServiceInfo)

func (*ProxyServiceInfoGetter) Delete

func (g *ProxyServiceInfoGetter) Delete(proxyServiceInfoName string)

func (*ProxyServiceInfoGetter) Get

func (g *ProxyServiceInfoGetter) Get(subResource string) *ProxyServiceInfo

Jump to

Keyboard shortcuts

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