k8schannel

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Upgrader = &websocket.Upgrader{CheckOrigin: func(req *http.Request) bool {
	return true
}, HandshakeTimeout: 15 * time.Second}

Functions

func AddCloseHandler

func AddCloseHandler(conn *websocket.Conn)

func GetHeadersFor

func GetHeadersFor(cfg *rest.Config) (http.Header, error)

Types

type Connection

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

func NewConnection

func NewConnection(conn *websocket.Conn, needsInit bool) *Connection

func (*Connection) Close

func (c *Connection) Close() (err error)

func (*Connection) ForStream

func (c *Connection) ForStream(streamNum uint8) net.Conn

func (*Connection) Read

func (c *Connection) Read(streamNum uint8, b []byte) (n int, err error)

func (*Connection) ToExecIO

func (c *Connection) ToExecIO(tty bool) *term.ExecIO

func (*Connection) Write

func (c *Connection) Write(streamNum uint8, b []byte) (n int, err error)

type Dialer

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

func NewDialer

func NewDialer(cfg *rest.Config, needsInit bool) (*Dialer, error)

func (*Dialer) DialContext

func (d *Dialer) DialContext(ctx context.Context, url string, headers http.Header) (*Connection, error)

func (*Dialer) DialMultiplexed

func (d *Dialer) DialMultiplexed(ctx context.Context, url string, headers http.Header) (*Connection, error)

func (*Dialer) DialWebsocket

func (d *Dialer) DialWebsocket(ctx context.Context, url string, headers http.Header) (*websocket.Conn, *http.Response, error)

Jump to

Keyboard shortcuts

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