terminal

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance interface {
	ID() string
	Key() store.Key
	Container() string
	Command() string
	Scrollback() []byte

	Read(size int) ([]byte, error)
	Write(key []byte) error
	Resize(cols, rows uint16)

	Stop()
	Active() bool
	SetExitMessage(string)
	ExitMessage() string
	CreatedAt() time.Time

	PTY() PTY
}

Instance defines the interface to a single exec instance.

func NewTerminalInstance

func NewTerminalInstance(ctx context.Context, logger log.Logger, key store.Key, container, command string, activityChan chan Instance) Instance

NewTerminalInstance creates a concrete Terminal

type Manager

type Manager interface {
	List(namespace string) []Instance
	Get(id string) (Instance, bool)
	Delete(id string)
	Create(ctx context.Context, logger log.Logger, key store.Key, container string, command string) (Instance, error)
	Select(ctx context.Context) chan Instance
	ForceUpdate(id string)
	SendScrollback(id string) bool
	SetScrollback(id string, send bool)
	StopAll() error
}

Manager defines the interface for querying terminal instance.

func NewTerminalManager

func NewTerminalManager(ctx context.Context, client cluster.ClientInterface, objectStore store.Store) (Manager, error)

NewTerminalManager creates a concrete TerminalMananger

type PTY

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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