cluster-api: sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/proxy Index | Files

package proxy

import "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/proxy"

Index

Package Files

addr.go conn.go dial.go proxy.go

func DialTimeout Uses

func DialTimeout(duration time.Duration) func(*Dialer) error

DialTimeout sets the timeout

type Addr Uses

type Addr struct {
    net.Addr
    // contains filtered or unexported fields
}

Addr defines a proxy net/addr format

func NewAddrFromConn Uses

func NewAddrFromConn(c Conn) Addr

NewAddrFromConn creates an Addr from the given connection

func (Addr) Network Uses

func (a Addr) Network() string

Network returns a fake network

func (Addr) String Uses

func (a Addr) String() string

String returns encoded information about the connection

type Conn Uses

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

Conn is a Kubernetes API server proxied type of net/conn

func NewConn Uses

func NewConn(connection httpstream.Connection, stream httpstream.Stream) Conn

NewConn creates a new net/conn interface based on an underlying Kubernetes API server proxy connection

func (Conn) Close Uses

func (c Conn) Close() error

Close the underlying proxied connection

func (Conn) LocalAddr Uses

func (c Conn) LocalAddr() net.Addr

Return a fake address representing the proxied connection

func (Conn) Read Uses

func (c Conn) Read(b []byte) (n int, err error)

Read from the connection

func (Conn) RemoteAddr Uses

func (c Conn) RemoteAddr() net.Addr

Return a fake address representing the proxied connection

func (Conn) SetDeadline Uses

func (c Conn) SetDeadline(t time.Time) error

SetDeadline sets the read and write deadlines to the specified interval

func (Conn) SetReadDeadline Uses

func (c Conn) SetReadDeadline(t time.Time) error

SetReadDeadline sets the read and write deadlines to the specified interval

func (Conn) SetWriteDeadline Uses

func (c Conn) SetWriteDeadline(t time.Time) error

SetWriteDeadline sets the read and write deadlines to the specified interval

func (Conn) Write Uses

func (c Conn) Write(b []byte) (n int, err error)

Write to the connection

type Dialer Uses

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

Dialer creates connections using Kubernetes API Server port-forwarding

func NewDialer Uses

func NewDialer(p Proxy, options ...func(*Dialer) error) (*Dialer, error)

NewDialer creates a new dialer for a given API server scope

func (*Dialer) DialContext Uses

func (d *Dialer) DialContext(_ context.Context, network string, addr string) (net.Conn, error)

DialContext creates proxied port-forwarded connections. ctx is currently unused, but fulfils the type signature used by GRPC.

func (*Dialer) DialContextWithAddr Uses

func (d *Dialer) DialContextWithAddr(ctx context.Context, addr string) (net.Conn, error)

DialContextWithAddr is a GO grpc compliant dialer construct

type Proxy Uses

type Proxy struct {

    // Kind is the kind of Kubernetes resource
    Kind string

    // Namespace is the namespace in which the Kubernetes resource exists
    Namespace string

    // ResourceName is the name of the Kubernetes resource
    ResourceName string

    // KubeConfig is the config to connect to the API server
    KubeConfig *rest.Config

    // TLSConfig is for connecting to TLS servers listening on a proxied port
    TLSConfig *tls.Config

    // KeepAlive specifies how often a keep alive message is sent to hold
    // the connection open
    KeepAlive *time.Duration

    // Port is the port to be forwarded from the relevant resource
    Port int
}

Proxy defines the API server port-forwarded proxy

Package proxy imports 14 packages (graph) and is imported by 2 packages. Updated 2020-09-05. Refresh now. Tools for package owners.