Help us shape the future of Go! Take the 2026 Go Developer Survey

agent

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dialer Dialer, logger slog.Logger) io.Closer

Types

type Conn

type Conn struct {
	// Negotiator is responsible for exchanging messages.
	Negotiator proto.DRPCPeerBrokerClient

	*peer.Conn
}

Conn wraps a peer connection with helper functions to communicate with the agent.

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) SSH

func (c *Conn) SSH() (net.Conn, error)

SSH dials the built-in SSH server.

func (*Conn) SSHClient

func (c *Conn) SSHClient() (*ssh.Client, error)

SSHClient calls SSH to create a client that uses a weak cipher for high throughput.

type Dialer

type Dialer func(ctx context.Context, logger slog.Logger) (Metadata, *peerbroker.Listener, error)

type Metadata added in v0.5.1

type Metadata struct {
	OwnerEmail           string            `json:"owner_email"`
	OwnerUsername        string            `json:"owner_username"`
	EnvironmentVariables map[string]string `json:"environment_variables"`
	StartupScript        string            `json:"startup_script"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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