agent

package module
v0.1.18-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	Config
	TunnelListener
	ChannelChan(api.ProtocolID) chan net.Conn
	AgentRegister(net.Conn) (Session, error)

	ConnectAndServe() error
	Serve(Session) error
}

inside agent there are: config (static) grpcServer (long lived) rpc client/server (ephemeral)

type Config

type Config interface {
	Info

	GetID() string
	GetName() string
	GetTags() []string

	GetHost() string
	GetPort() string
	GetAddr() string
	GetScheme() string
	GetSchemeWS() string

	GetCmd() []string
	GetReadOnly() bool
	GetVerbose() bool
	GetInsecure() bool
	GetPet() bool

	String() string

	GetVersion() *version.Version
}

type Info

type Info interface {
	GetOS() string
	GetPwd() string
	GetArch() string
	GetHostname() string
	GetUsername() string
}

type Session added in v0.1.17

type Session interface {
	// NewConnection()
	// Ping()
	// Pong()
	// Connect() (net.Conn, error)
	Close()
	Done() <-chan struct{}
	Actions() <-chan func(Agent)
}

type Tty

type Tty interface {
	io.ReadWriteCloser
	Resize(rows int, cols int) error
}

type TtyFactory

type TtyFactory interface {
	MakeTty() (Tty, error)
	MakeTtyCmd([]string) (Tty, error)
	MakeTtyEnv([]string, map[string]string) (Tty, error)
}

type TunnelListener

type TunnelListener interface {
	AcceptProtocol(api.ProtocolID) (net.Conn, error)
}

Directories

Path Synopsis
tty

Jump to

Keyboard shortcuts

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