Documentation
¶
Index ¶
- Constants
- type Service
- func (s Service) CreateLease(taskPath string) (string, error)
- func (s Service) CreateSession(leaseID string) (string, error)
- func (s Service) CreateSessionFromWorkspace(req WorkspaceSessionRequest) (string, error)
- func (s Service) Exec(sessionID string, command []string, stream bool) (string, error)
- func (s Service) ExecStream(sessionID string, command []string, stdout, stderr io.Writer) (string, error)
- func (s Service) ExposePort(sessionID string, port int) (string, error)
- func (s Service) InspectSession(sessionID string) (SessionInfo, error)
- func (s Service) Interrupt(processID string) error
- func (s Service) ListSessions() ([]SessionInfo, error)
- func (s Service) RemoveSession(sessionID string) error
- func (s Service) ResumeSnapshot(snapshotNameOrID, leaseID string) (string, error)
- func (s Service) SetSessionCPUProfile(sessionID, profile string) error
- func (s Service) StopSession(sessionID string) error
- type SessionInfo
- type Task
- type WorkspaceSessionRequest
Constants ¶
View Source
const ( CPUProfileThink = "think" CPUProfileTool = "tool" CPUWeightThink = int64(2) CPUWeightTool = int64(1024) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
func (Service) CreateSessionFromWorkspace ¶
func (s Service) CreateSessionFromWorkspace(req WorkspaceSessionRequest) (string, error)
func (Service) ExecStream ¶
func (Service) InspectSession ¶
func (s Service) InspectSession(sessionID string) (SessionInfo, error)
func (Service) ListSessions ¶
func (s Service) ListSessions() ([]SessionInfo, error)
func (Service) RemoveSession ¶
func (Service) ResumeSnapshot ¶
func (Service) SetSessionCPUProfile ¶
func (Service) StopSession ¶
type SessionInfo ¶
type Task ¶
type Task struct {
RunID string `yaml:"run_id"`
Image string `yaml:"image"`
Workspace string `yaml:"workspace"`
Command []string `yaml:"command"`
RiskTier string `yaml:"risk_tier"`
NetworkMode string `yaml:"network_mode"`
CPURequest float64 `yaml:"cpu_request"`
MemoryMB int64 `yaml:"memory_mb"`
TimeoutSeconds int `yaml:"timeout_seconds"`
}
Click to show internal directories.
Click to hide internal directories.