Documentation
¶
Index ¶
- type FlyOptions
- type FlySandboxEnvironment
- func (e *FlySandboxEnvironment) Capabilities() environment.Capabilities
- func (e *FlySandboxEnvironment) Create(ctx context.Context, config environment.SessionConfig) error
- func (e *FlySandboxEnvironment) CreateSnapshot(context.Context, string) (*environment.SnapshotInfo, error)
- func (e *FlySandboxEnvironment) Destroy(ctx context.Context) error
- func (e *FlySandboxEnvironment) ExecuteTool(ctx context.Context, req environment.ToolRequest, ...) (*environment.ToolResponse, error)
- func (e *FlySandboxEnvironment) Pause(ctx context.Context) error
- func (e *FlySandboxEnvironment) Resume(ctx context.Context) error
- func (e *FlySandboxEnvironment) Rollback(context.Context, string) error
- func (e *FlySandboxEnvironment) State() environment.SessionState
- type Option
- type SSHExecResult
- type SSHExecutor
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 (e *FlySandboxEnvironment) Capabilities() environment.Capabilities
func (*FlySandboxEnvironment) Create ¶
func (e *FlySandboxEnvironment) Create(ctx context.Context, config environment.SessionConfig) error
func (*FlySandboxEnvironment) CreateSnapshot ¶
func (e *FlySandboxEnvironment) CreateSnapshot(context.Context, string) (*environment.SnapshotInfo, error)
func (*FlySandboxEnvironment) Destroy ¶
func (e *FlySandboxEnvironment) Destroy(ctx context.Context) error
func (*FlySandboxEnvironment) ExecuteTool ¶
func (e *FlySandboxEnvironment) ExecuteTool(ctx context.Context, req environment.ToolRequest, onProgress func(environment.ToolProgress)) (*environment.ToolResponse, error)
func (*FlySandboxEnvironment) Pause ¶
func (e *FlySandboxEnvironment) Pause(ctx context.Context) error
func (*FlySandboxEnvironment) Resume ¶
func (e *FlySandboxEnvironment) Resume(ctx context.Context) error
func (*FlySandboxEnvironment) Rollback ¶
func (e *FlySandboxEnvironment) Rollback(context.Context, string) error
func (*FlySandboxEnvironment) State ¶
func (e *FlySandboxEnvironment) State() environment.SessionState
type Option ¶
type Option func(*FlySandboxEnvironment)
func WithBaseURL ¶
func WithHTTPClient ¶
func WithLogger ¶
func WithSSHExecutor ¶
func WithSSHExecutor(exec SSHExecutor) Option
func WithSSHUser ¶
type SSHExecResult ¶
type SSHExecutor ¶
type SSHExecutor func(ctx context.Context, addr, command string, onProgress func(environment.ToolProgress)) (*SSHExecResult, error)
Click to show internal directories.
Click to hide internal directories.