ssh

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProcessManager

func NewProcessManager(pool *Pool, machine domain.Machine) provider.AgentCLIProcessManager

func ShellQuote

func ShellQuote(raw string) string

ShellQuote escapes a raw argument for POSIX shell evaluation.

Types

type Client

type Client interface {
	NewSession() (Session, error)
	SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error)
	Close() error
}

type DialConfig

type DialConfig struct {
	Address         string
	User            string
	KeyBytes        []byte
	Timeout         time.Duration
	HostKeyCallback gossh.HostKeyCallback
}

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, cfg DialConfig) (Client, error)
}

type MonitorCollector

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

func NewMonitorCollector

func NewMonitorCollector(pool *Pool) *MonitorCollector

func (*MonitorCollector) CollectAgentEnvironment

func (c *MonitorCollector) CollectAgentEnvironment(ctx context.Context, machine domain.Machine) (domain.MachineAgentEnvironment, error)

func (*MonitorCollector) CollectFullAudit

func (c *MonitorCollector) CollectFullAudit(ctx context.Context, machine domain.Machine) (domain.MachineFullAudit, error)

func (*MonitorCollector) CollectGPUResources

func (c *MonitorCollector) CollectGPUResources(ctx context.Context, machine domain.Machine) (domain.MachineGPUResources, error)

func (*MonitorCollector) CollectReachability

func (c *MonitorCollector) CollectReachability(ctx context.Context, machine domain.Machine) (domain.MachineReachability, error)

func (*MonitorCollector) CollectSystemResources

func (c *MonitorCollector) CollectSystemResources(ctx context.Context, machine domain.Machine) (domain.MachineSystemResources, error)

type Pool

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

func NewPool

func NewPool(openASEHomeDir string, opts ...PoolOption) *Pool

func (*Pool) Close

func (p *Pool) Close() error

func (*Pool) Get

func (p *Pool) Get(ctx context.Context, machine domain.Machine) (Client, error)

type PoolOption

type PoolOption func(*Pool)

func WithDialer

func WithDialer(dialer Dialer) PoolOption

func WithHostKeyCallback

func WithHostKeyCallback(callback gossh.HostKeyCallback) PoolOption

func WithReadFile

func WithReadFile(readFile func(string) ([]byte, error)) PoolOption

func WithTimeout

func WithTimeout(timeout time.Duration) PoolOption

type ProcessManager

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

func (*ProcessManager) Start

type Session

type Session interface {
	CombinedOutput(cmd string) ([]byte, error)
	StdinPipe() (io.WriteCloser, error)
	StdoutPipe() (io.Reader, error)
	StderrPipe() (io.Reader, error)
	Start(cmd string) error
	Signal(signal string) error
	Wait() error
	Close() error
}

type Tester

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

func NewTester

func NewTester(pool *Pool) *Tester

func (*Tester) TestConnection

func (t *Tester) TestConnection(ctx context.Context, machine domain.Machine) (domain.MachineProbe, error)

Jump to

Keyboard shortcuts

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