console

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToConsole added in v0.0.4

func ConnectToConsole(config *rest.Config, namespace string, name string, console string, callback RoundTripCallback) error

func RequestFromConfig added in v0.0.4

func RequestFromConfig(config *rest.Config, vm string, namespace string, device string) (*http.Request, error)

func RoundTripperFromConfig added in v0.0.4

func RoundTripperFromConfig(config *rest.Config, callback RoundTripCallback) (http.RoundTripper, error)

func TerminalWebsocketCallback added in v0.0.4

func TerminalWebsocketCallback(ws *websocket.Conn, resp *http.Response, connErr error) error

Types

type Console

type Console struct {
}

func (*Console) FlagSet

func (c *Console) FlagSet() *flag.FlagSet

func (*Console) Run

func (c *Console) Run(flags *flag.FlagSet) int

func (*Console) Usage

func (c *Console) Usage() string

type RoundTripCallback

type RoundTripCallback func(conn *websocket.Conn, resp *http.Response, err error) error

func NewWebsocketCallback added in v0.0.4

func NewWebsocketCallback(in io.ReadCloser, out io.WriteCloser, stopChan chan struct{}) RoundTripCallback

type WebsocketRoundTripper

type WebsocketRoundTripper struct {
	Dialer *websocket.Dialer
	Do     RoundTripCallback
}

func (*WebsocketRoundTripper) RoundTrip

func (d *WebsocketRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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