Documentation ¶
Overview ¶
Package proxy implements kubeadm proxy functionality.
Index ¶
- func DialTimeout(duration time.Duration) func(*Dialer) error
- type Addr
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Read(b []byte) (n int, err error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) Write(b []byte) (n int, err error)
- type Dialer
- type Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Addr ¶
Addr defines a proxy net/addr format.
func NewAddrFromConn ¶
NewAddrFromConn creates an Addr from the given connection.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a Kubernetes API server proxied type of net/conn.
func NewConn ¶
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) RemoteAddr ¶
RemoteAddr returns a fake address representing the proxied connection.
func (*Conn) SetDeadline ¶
SetDeadline sets the read and write deadlines to the specified interval.
func (*Conn) SetReadDeadline ¶
SetReadDeadline sets the read and write deadlines to the specified interval.
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline sets the read and write deadlines to the specified interval.
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
Dialer creates connections using Kubernetes API Server port-forwarding.
func (*Dialer) DialContext ¶
DialContext creates proxied port-forwarded connections. ctx is currently unused, but fulfils the type signature used by GRPC.
type Proxy ¶
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 // 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.