terminal

package
v0.0.0-...-dfce1b8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID = string

type Manager

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

func NewManager

func NewManager(logger *zap.SugaredLogger) *Manager

func (*Manager) Add

func (m *Manager) Add(
	id,
	shell string,
	rootdir *string,
	cols,
	rows uint16,
	envVars *map[string]string,
	cmd *string,
) (*Terminal, error)

func (*Manager) Get

func (m *Manager) Get(id ID) (*Terminal, bool)

func (*Manager) Remove

func (m *Manager) Remove(id ID)

type Service

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

func NewService

func NewService(logger *zap.SugaredLogger, env *env.EnvConfig, clock *clock.Service) *Service

func (*Service) Data

func (s *Service) Data(id ID, data string) error

func (*Service) Destroy

func (s *Service) Destroy(id ID)

func (*Service) OnData

func (s *Service) OnData(ctx context.Context, id ID) (*rpc.Subscription, error)

Subscription

func (*Service) OnExit

func (s *Service) OnExit(ctx context.Context, id ID) (*rpc.Subscription, error)

Subscription

func (*Service) Resize

func (s *Service) Resize(id ID, cols, rows uint16) error

func (*Service) Start

func (s *Service) Start(id ID, cols, rows uint16, envVars *map[string]string, cmd, rootdir *string) (ID, error)

type Terminal

type Terminal struct {
	ID ID
	// contains filtered or unexported fields
}

func New

func New(id, shell string, rootdir *string, cols, rows uint16, envVars *map[string]string, cmdToExecute *string, logger *zap.SugaredLogger) (*Terminal, error)

func (*Terminal) Destroy

func (t *Terminal) Destroy()

func (*Terminal) Pid

func (t *Terminal) Pid() int

func (*Terminal) Resize

func (t *Terminal) Resize(cols, rows uint16) error

func (*Terminal) Write

func (t *Terminal) Write(b []byte) error

Jump to

Keyboard shortcuts

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