tty

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	io.ReadWriter

	ResizeTerminal(columns int, row int) error
}

type AgentFactory added in v0.3.0

type AgentFactory = func() (Agent, error)

type Controller

type Controller interface {
	io.ReadWriter
}

type Message

type Message rune
const (
	Input          Message = '0'
	Output         Message = '1'
	ResizeTerminal Message = '2'

	Auth       Message = 'a'
	AuthTry    Message = 'b'
	AuthOK     Message = 'c'
	AuthFailed Message = 'd'
)

type TTY

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

func New

func New(controller Controller, agentFactory AgentFactory) *TTY

func (*TTY) Run

func (t *TTY) Run(ctx context.Context) error

func (*TTY) WithAuthCheck added in v0.3.0

func (t *TTY) WithAuthCheck(c auth.AuthCheck)

func (*TTY) WithWrite added in v0.3.0

func (t *TTY) WithWrite(b bool)

Jump to

Keyboard shortcuts

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