localcommand

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0, MIT Imports: 8 Imported by: 4

Documentation

Overview

Package localcommand provides an implementation of webtty.Slave that launches a local command with a PTY.

Index

Constants

View Source
const (
	DefaultCloseSignal  = syscall.SIGINT
	DefaultCloseTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

func NewFactory

func NewFactory(command string, argv []string, options *Options) (*Factory, error)

func (*Factory) Name

func (factory *Factory) Name() string

func (*Factory) New

func (factory *Factory) New(params map[string][]string) (server.Slave, error)

type LocalCommand

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

func New

func New(command string, argv []string, options ...Option) (*LocalCommand, error)

func (*LocalCommand) Close

func (lcmd *LocalCommand) Close() error

func (*LocalCommand) Read

func (lcmd *LocalCommand) Read(p []byte) (n int, err error)

func (*LocalCommand) ResizeTerminal

func (lcmd *LocalCommand) ResizeTerminal(width int, height int) error

func (*LocalCommand) WindowTitleVariables

func (lcmd *LocalCommand) WindowTitleVariables() map[string]interface{}

func (*LocalCommand) Write

func (lcmd *LocalCommand) Write(p []byte) (n int, err error)

type Option

type Option func(*LocalCommand)

func WithCloseSignal

func WithCloseSignal(signal syscall.Signal) Option

func WithCloseTimeout

func WithCloseTimeout(timeout time.Duration) Option

type Options

type Options struct {
	CloseSignal  int `` /* 155-byte string literal not displayed */
	CloseTimeout int `` /* 166-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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