interactive

package
v56.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package interactive provides a way to run an interactive shell in a task.

Index

Constants

View Source
const (
	MsgStdin  = 1
	MsgResize = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInteractiveProcess

type CreateInteractiveProcess func() (*exec.Cmd, error)

type Interactive

type Interactive struct {
	TCPPort uint16
	GetURL  string
	// contains filtered or unexported fields
}

func New

func New(port uint16, cmd CreateInteractiveProcess, ctx context.Context) (it *Interactive, err error)

func (*Interactive) Handler

func (it *Interactive) Handler(w http.ResponseWriter, r *http.Request)

func (*Interactive) ListenAndServe

func (it *Interactive) ListenAndServe(ctx context.Context) error

type InteractiveJob

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

func CreateInteractiveJob

func CreateInteractiveJob(createCmd CreateInteractiveProcess, conn *websocket.Conn, ctx context.Context) (itj *InteractiveJob, err error)

func (*InteractiveJob) Terminate

func (itj *InteractiveJob) Terminate() (err error)

Jump to

Keyboard shortcuts

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