fly

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlyOptions

type FlyOptions struct {
	Image    string
	Region   string
	CPUs     int
	MemoryMB int
	VolumeGB int
	EnvVars  map[string]string
}

FlyOptions carries Fly-specific machine provisioning options.

type FlySandboxEnvironment

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

FlySandboxEnvironment implements environment.ExecutionEnvironment using Fly Machines API + SSH.

func NewFlySandboxEnvironment

func NewFlySandboxEnvironment(apiToken, appName string, sshPrivateKey []byte, pinnedHostKey string, opts ...Option) *FlySandboxEnvironment

func (*FlySandboxEnvironment) Capabilities

func (*FlySandboxEnvironment) Create

func (*FlySandboxEnvironment) CreateSnapshot

func (*FlySandboxEnvironment) Destroy

func (e *FlySandboxEnvironment) Destroy(ctx context.Context) error

func (*FlySandboxEnvironment) ExecuteTool

func (*FlySandboxEnvironment) Pause

func (*FlySandboxEnvironment) Resume

func (e *FlySandboxEnvironment) Resume(ctx context.Context) error

func (*FlySandboxEnvironment) Rollback

func (*FlySandboxEnvironment) State

type Option

type Option func(*FlySandboxEnvironment)

func WithBaseURL

func WithBaseURL(baseURL string) Option

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

func WithSSHExecutor

func WithSSHExecutor(exec SSHExecutor) Option

func WithSSHUser

func WithSSHUser(user string) Option

type SSHExecResult

type SSHExecResult struct {
	Stdout   string
	Stderr   string
	ExitCode int
}

type SSHExecutor

type SSHExecutor func(ctx context.Context, addr, command string, onProgress func(environment.ToolProgress)) (*SSHExecResult, error)

Jump to

Keyboard shortcuts

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