connectors

package
v0.0.0-...-0ff8929 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UIDDirectConnector = "direct"
)
View Source
const (
	UIDInClusterConnector = "incluster"
)
View Source
const (
	UIDKubeconfigConnector = "kubeconfig"
)

Variables

This section is empty.

Functions

func Connect

func Connect(cfg Config) (conn *grpc.ClientConn, err error)

connect returns a grpc connection to tiller or error. The grpc dial options are constructed here.

func Connection

func Connection(ctx context.Context) *grpc.ClientConn

func NewDirectConnector

func NewDirectConnector(cfg Config) extpoints.Connector

func NewInClusterConnector

func NewInClusterConnector(cfg Config) extpoints.Connector

func NewKubeconfigConnector

func NewKubeconfigConnector(cfg Config) extpoints.Connector

func Tunnel

func Tunnel(ctx context.Context) *portforward.Tunnel

func WithConnection

func WithConnection(parent context.Context, v *grpc.ClientConn) context.Context

func WithTunnel

func WithTunnel(parent context.Context, v *portforward.Tunnel) context.Context

Types

type Config

type Config struct {
	Endpoint             string
	CACertFile           string
	ClientCertFile       string
	ClientPrivateKeyFile string
	InsecureSkipVerify   bool
	Timeout              time.Duration
	KubeContext          string
	LogRPC               bool
}

type DirectConnector

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

func (*DirectConnector) Close

func (c *DirectConnector) Close(ctx context.Context) error

func (*DirectConnector) Connect

func (c *DirectConnector) Connect(ctx context.Context) (context.Context, error)

func (*DirectConnector) UID

func (c *DirectConnector) UID() string

type InClusterConnector

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

func (*InClusterConnector) Close

func (c *InClusterConnector) Close(ctx context.Context) error

func (*InClusterConnector) Connect

func (*InClusterConnector) UID

func (c *InClusterConnector) UID() string

type KubeconfigConnector

type KubeconfigConnector struct {
	*TunnelConnector
	// contains filtered or unexported fields
}

func (*KubeconfigConnector) Close

func (c *KubeconfigConnector) Close(ctx context.Context) error

func (*KubeconfigConnector) Connect

func (*KubeconfigConnector) UID

func (c *KubeconfigConnector) UID() string

type TunnelConnector

type TunnelConnector struct {
}

func (*TunnelConnector) GetTillerAddr

func (s *TunnelConnector) GetTillerAddr(client clientset.Interface, config *rest.Config) (*portforward.Tunnel, error)

Jump to

Keyboard shortcuts

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