Documentation
¶
Index ¶
- Variables
- func NewProcessManager(transport Transport, machine domain.Machine) provider.AgentCLIProcessManager
- func NewWebsocketListenerHandler(options ListenerHandlerOptions) http.Handler
- func RunRemoteRuntimePreflight(ctx context.Context, execution CommandSessionExecution, machine domain.Machine, ...) error
- func StartRuntimeLocalRelayServerForCLI(ctx context.Context, relay *RuntimeLocalRelayManager, address string) (*http.Server, string, error)
- type ArtifactSyncExecution
- type ChannelTransport
- type CommandSession
- type CommandSessionExecution
- type DaemonRuntimeProtocolServer
- type ExecutionSurface
- type ListenerHandlerOptions
- type MonitorCollector
- func (c *MonitorCollector) CollectAgentEnvironment(ctx context.Context, machine domain.Machine) (domain.MachineAgentEnvironment, error)
- func (c *MonitorCollector) CollectFullAudit(ctx context.Context, machine domain.Machine) (domain.MachineFullAudit, error)
- func (c *MonitorCollector) CollectGPUResources(ctx context.Context, machine domain.Machine) (domain.MachineGPUResources, error)
- func (c *MonitorCollector) CollectReachability(ctx context.Context, machine domain.Machine) (domain.MachineReachability, error)
- func (c *MonitorCollector) CollectSystemResources(ctx context.Context, machine domain.Machine) (domain.MachineSystemResources, error)
- func (c *MonitorCollector) CollectWebsocketHealth(ctx context.Context, machine domain.Machine) (domain.WebsocketMachineHealth, error)
- type ProbeExecution
- type ProcessExecution
- type ProcessExitError
- type RemoteRuntimeSurface
- type ResolvedTransport
- func (r ResolvedTransport) ArtifactSyncExecutor() ArtifactSyncExecution
- func (r ResolvedTransport) CommandSessionExecutor() CommandSessionExecution
- func (r ResolvedTransport) ProbeExecutor() ProbeExecution
- func (r ResolvedTransport) ProcessExecutor() ProcessExecution
- func (r ResolvedTransport) WorkspaceExecutor() WorkspaceExecution
- type Resolver
- type ReverseRuntimeRelayRegistry
- type RuntimeLocalRelayManager
- type RuntimePreflightError
- type RuntimePreflightSpec
- type RuntimePreflightStage
- type SyncArtifactsRequest
- type Tester
- type Transport
- type WorkspaceExecution
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewProcessManager ¶
func NewProcessManager(transport Transport, machine domain.Machine) provider.AgentCLIProcessManager
func NewWebsocketListenerHandler ¶
func NewWebsocketListenerHandler(options ListenerHandlerOptions) http.Handler
func RunRemoteRuntimePreflight ¶
func RunRemoteRuntimePreflight( ctx context.Context, execution CommandSessionExecution, machine domain.Machine, spec RuntimePreflightSpec, ) error
func StartRuntimeLocalRelayServerForCLI ¶ added in v0.7.0
Types ¶
type ArtifactSyncExecution ¶ added in v0.2.0
type ChannelTransport ¶ added in v0.2.0
type CommandSession ¶
type CommandSession interface {
CombinedOutput(cmd string) ([]byte, error)
StdinPipe() (io.WriteCloser, error)
StdoutPipe() (io.Reader, error)
StderrPipe() (io.Reader, error)
Start(cmd string) error
StartPTY(cmd string, cols int, rows int) error
Resize(cols int, rows int) error
Signal(signal string) error
Wait() error
Close() error
}
type CommandSessionExecution ¶ added in v0.2.0
type DaemonRuntimeProtocolServer ¶ added in v0.2.0
type DaemonRuntimeProtocolServer struct {
// contains filtered or unexported fields
}
func NewDaemonRuntimeProtocolServer ¶ added in v0.2.0
func NewDaemonRuntimeProtocolServer(send func(context.Context, runtimecontract.Envelope) error) *DaemonRuntimeProtocolServer
func (*DaemonRuntimeProtocolServer) Close ¶ added in v0.2.0
func (s *DaemonRuntimeProtocolServer) Close()
func (*DaemonRuntimeProtocolServer) HandleEnvelope ¶ added in v0.2.0
func (s *DaemonRuntimeProtocolServer) HandleEnvelope(ctx context.Context, envelope runtimecontract.Envelope) error
type ExecutionSurface ¶ added in v0.2.0
type ExecutionSurface struct {
Probe ProbeExecution
Workspace WorkspaceExecution
ArtifactSync ArtifactSyncExecution
Process ProcessExecution
CommandSession CommandSessionExecution
Runtime *RemoteRuntimeSurface
// contains filtered or unexported fields
}
func (ExecutionSurface) Capabilities ¶ added in v0.2.0
func (s ExecutionSurface) Capabilities() []domain.MachineTransportCapability
func (ExecutionSurface) Supports ¶ added in v0.2.0
func (s ExecutionSurface) Supports(capability domain.MachineTransportCapability) bool
func (ExecutionSurface) SupportsAll ¶ added in v0.2.0
func (s ExecutionSurface) SupportsAll(capabilities ...domain.MachineTransportCapability) bool
type ListenerHandlerOptions ¶
type ListenerHandlerOptions struct {
BearerToken string
APIRelay *runtimeAPIRelayManager
}
type MonitorCollector ¶
type MonitorCollector struct {
// contains filtered or unexported fields
}
func NewMonitorCollector ¶
func NewMonitorCollector(resolver *Resolver, sshPool *sshinfra.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)
func (*MonitorCollector) CollectWebsocketHealth ¶ added in v0.6.0
func (c *MonitorCollector) CollectWebsocketHealth(ctx context.Context, machine domain.Machine) (domain.WebsocketMachineHealth, error)
type ProbeExecution ¶ added in v0.2.0
type ProcessExecution ¶ added in v0.2.0
type ProcessExecution interface {
StartProcess(ctx context.Context, machine domain.Machine, spec provider.AgentCLIProcessSpec) (provider.AgentCLIProcess, error)
}
type ProcessExitError ¶
type ProcessExitError struct {
// contains filtered or unexported fields
}
func (ProcessExitError) Error ¶
func (e ProcessExitError) Error() string
func (ProcessExitError) ExitStatus ¶
func (e ProcessExitError) ExitStatus() int
type RemoteRuntimeSurface ¶ added in v0.2.0
type RemoteRuntimeSurface struct {
Probe ProbeExecution
Workspace WorkspaceExecution
ArtifactSync ArtifactSyncExecution
Process ProcessExecution
CommandSession CommandSessionExecution
// contains filtered or unexported fields
}
func (*RemoteRuntimeSurface) Capabilities ¶ added in v0.2.0
func (s *RemoteRuntimeSurface) Capabilities() []domain.MachineTransportCapability
func (*RemoteRuntimeSurface) Supports ¶ added in v0.2.0
func (s *RemoteRuntimeSurface) Supports(capability domain.MachineTransportCapability) bool
func (*RemoteRuntimeSurface) SupportsAll ¶ added in v0.2.0
func (s *RemoteRuntimeSurface) SupportsAll(capabilities ...domain.MachineTransportCapability) bool
type ResolvedTransport ¶ added in v0.2.0
type ResolvedTransport struct {
Channel ChannelTransport
Execution ExecutionSurface
}
func (ResolvedTransport) ArtifactSyncExecutor ¶ added in v0.3.0
func (r ResolvedTransport) ArtifactSyncExecutor() ArtifactSyncExecution
func (ResolvedTransport) CommandSessionExecutor ¶ added in v0.3.0
func (r ResolvedTransport) CommandSessionExecutor() CommandSessionExecution
func (ResolvedTransport) ProbeExecutor ¶ added in v0.3.0
func (r ResolvedTransport) ProbeExecutor() ProbeExecution
func (ResolvedTransport) ProcessExecutor ¶ added in v0.3.0
func (r ResolvedTransport) ProcessExecutor() ProcessExecution
func (ResolvedTransport) WorkspaceExecutor ¶ added in v0.3.0
func (r ResolvedTransport) WorkspaceExecutor() WorkspaceExecution
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver(localProcessManager provider.AgentCLIProcessManager, sshPool *sshinfra.Pool) *Resolver
func (*Resolver) ResolveRuntime ¶ added in v0.2.0
func (r *Resolver) ResolveRuntime(machine domain.Machine) (ResolvedTransport, error)
func (*Resolver) WithReverseRuntimeRelay ¶ added in v0.2.0
func (r *Resolver) WithReverseRuntimeRelay(relay *ReverseRuntimeRelayRegistry) *Resolver
type ReverseRuntimeRelayRegistry ¶ added in v0.2.0
type ReverseRuntimeRelayRegistry struct {
// contains filtered or unexported fields
}
func NewReverseRuntimeRelayRegistry ¶ added in v0.2.0
func NewReverseRuntimeRelayRegistry() *ReverseRuntimeRelayRegistry
func (*ReverseRuntimeRelayRegistry) Deliver ¶ added in v0.2.0
func (r *ReverseRuntimeRelayRegistry) Deliver(sessionID string, envelope runtimecontract.Envelope) error
func (*ReverseRuntimeRelayRegistry) Register ¶ added in v0.2.0
func (r *ReverseRuntimeRelayRegistry) Register( machineID uuid.UUID, sessionID string, send runtimeEnvelopeSender, )
func (*ReverseRuntimeRelayRegistry) Remove ¶ added in v0.2.0
func (r *ReverseRuntimeRelayRegistry) Remove(sessionID string)
type RuntimeLocalRelayManager ¶ added in v0.7.0
type RuntimeLocalRelayManager = runtimeAPIRelayManager
func NewRuntimeLocalRelayManagerForCLI ¶ added in v0.7.0
func NewRuntimeLocalRelayManagerForCLI() *RuntimeLocalRelayManager
type RuntimePreflightError ¶
type RuntimePreflightError struct {
Stage RuntimePreflightStage
Message string
Cause error
}
func (*RuntimePreflightError) Error ¶
func (e *RuntimePreflightError) Error() string
func (*RuntimePreflightError) Unwrap ¶
func (e *RuntimePreflightError) Unwrap() error
type RuntimePreflightSpec ¶
type RuntimePreflightStage ¶
type RuntimePreflightStage string
const ( RuntimePreflightStageTransport RuntimePreflightStage = "transport" RuntimePreflightStageWorkspace RuntimePreflightStage = "workspace" RuntimePreflightStageOpenASE RuntimePreflightStage = "openase" RuntimePreflightStageAgentCLI RuntimePreflightStage = "agent_cli" )
type SyncArtifactsRequest ¶
type Tester ¶
type Tester struct {
// contains filtered or unexported fields
}
func (*Tester) TestConnection ¶
type Transport ¶
type Transport interface {
Mode() domain.MachineConnectionMode
Capabilities(machine domain.Machine) []domain.MachineTransportCapability
Probe(ctx context.Context, machine domain.Machine) (domain.MachineProbe, error)
PrepareWorkspace(ctx context.Context, machine domain.Machine, request workspaceinfra.SetupRequest) (workspaceinfra.Workspace, error)
SyncArtifacts(ctx context.Context, machine domain.Machine, request SyncArtifactsRequest) error
StartProcess(ctx context.Context, machine domain.Machine, spec provider.AgentCLIProcessSpec) (provider.AgentCLIProcess, error)
OpenCommandSession(ctx context.Context, machine domain.Machine) (CommandSession, error)
SessionState(ctx context.Context, machine domain.Machine) (domain.MachineTransportSessionState, error)
Heartbeat(ctx context.Context, machine domain.Machine) (domain.MachineDaemonStatus, error)
}
type WorkspaceExecution ¶ added in v0.2.0
type WorkspaceExecution interface {
PrepareWorkspace(ctx context.Context, machine domain.Machine, request workspaceinfra.SetupRequest) (workspaceinfra.Workspace, error)
}
Click to show internal directories.
Click to hide internal directories.