Documentation
¶
Index ¶
- func ResolveBinary(stateDir string, stateRoot string) (string, error)
- type Instance
- type Runner
- type RunnerOptions
- type RuntimeDetectionState
- type RuntimeInstalledVersionStatus
- type RuntimeManager
- func (m *RuntimeManager) AppendImportChunk(ctx context.Context, uploadID string, chunkIndex int64, chunk io.Reader) (WorkspaceEngineImportChunkResult, error)
- func (m *RuntimeManager) CancelActiveImportSession(ctx context.Context) error
- func (m *RuntimeManager) CancelImportSession(ctx context.Context, uploadID string) error
- func (m *RuntimeManager) CancelOperation(ctx context.Context) RuntimeStatus
- func (m *RuntimeManager) CompleteImportSession(ctx context.Context, uploadID string) (RuntimeStatus, error)
- func (m *RuntimeManager) CreateImportSession(ctx context.Context, manifest WorkspaceEngineArtifactManifest) (WorkspaceEngineImportSession, error)
- func (m *RuntimeManager) RemoveLocalEnvironmentVersion(ctx context.Context, version string) (RuntimeStatus, error)
- func (m *RuntimeManager) SelectVersion(ctx context.Context, version string) (RuntimeStatus, error)
- func (m *RuntimeManager) Status(ctx context.Context) RuntimeStatus
- type RuntimeManagerOptions
- type RuntimeOperationAction
- type RuntimeOperationStage
- type RuntimeOperationState
- type RuntimeOperationStatus
- type RuntimeStatus
- type RuntimeTargetStatus
- type WorkspaceEngineArchive
- type WorkspaceEngineArchiveLayout
- type WorkspaceEngineArtifactManifest
- type WorkspaceEngineArtifactSource
- type WorkspaceEngineImportChunkResult
- type WorkspaceEngineImportSession
- type WorkspaceEnginePlatform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewRunner ¶
func NewRunner(opts RunnerOptions) *Runner
func (*Runner) EnsureRunning ¶
type RunnerOptions ¶
type RuntimeDetectionState ¶
type RuntimeDetectionState string
const ( RuntimeDetectionReady RuntimeDetectionState = "ready" RuntimeDetectionMissing RuntimeDetectionState = "missing" RuntimeDetectionUnusable RuntimeDetectionState = "unusable" )
type RuntimeInstalledVersionStatus ¶
type RuntimeInstalledVersionStatus struct {
Version string `json:"version"`
BinaryPath string `json:"binary_path,omitempty"`
InstalledAtUnixMs int64 `json:"installed_at_unix_ms,omitempty"`
SelectedByLocalEnvironment bool `json:"selected_by_local_environment,omitempty"`
Removable bool `json:"removable,omitempty"`
DetectionState RuntimeDetectionState `json:"detection_state"`
ErrorMessage string `json:"error_message,omitempty"`
}
type RuntimeManager ¶
type RuntimeManager struct {
// contains filtered or unexported fields
}
func NewRuntimeManager ¶
func NewRuntimeManager(opts RuntimeManagerOptions) *RuntimeManager
func (*RuntimeManager) AppendImportChunk ¶ added in v0.6.10
func (m *RuntimeManager) AppendImportChunk(ctx context.Context, uploadID string, chunkIndex int64, chunk io.Reader) (WorkspaceEngineImportChunkResult, error)
func (*RuntimeManager) CancelActiveImportSession ¶ added in v0.6.10
func (m *RuntimeManager) CancelActiveImportSession(ctx context.Context) error
func (*RuntimeManager) CancelImportSession ¶ added in v0.6.10
func (m *RuntimeManager) CancelImportSession(ctx context.Context, uploadID string) error
func (*RuntimeManager) CancelOperation ¶
func (m *RuntimeManager) CancelOperation(ctx context.Context) RuntimeStatus
func (*RuntimeManager) CompleteImportSession ¶ added in v0.6.10
func (m *RuntimeManager) CompleteImportSession(ctx context.Context, uploadID string) (RuntimeStatus, error)
func (*RuntimeManager) CreateImportSession ¶ added in v0.6.10
func (m *RuntimeManager) CreateImportSession(ctx context.Context, manifest WorkspaceEngineArtifactManifest) (WorkspaceEngineImportSession, error)
func (*RuntimeManager) RemoveLocalEnvironmentVersion ¶
func (m *RuntimeManager) RemoveLocalEnvironmentVersion(ctx context.Context, version string) (RuntimeStatus, error)
func (*RuntimeManager) SelectVersion ¶
func (m *RuntimeManager) SelectVersion(ctx context.Context, version string) (RuntimeStatus, error)
func (*RuntimeManager) Status ¶
func (m *RuntimeManager) Status(ctx context.Context) RuntimeStatus
type RuntimeManagerOptions ¶
type RuntimeOperationAction ¶
type RuntimeOperationAction string
const ( RuntimeOperationActionPrepareWorkspaceEngine RuntimeOperationAction = "prepare_workspace_engine" RuntimeOperationActionRemoveLocalEnvironmentVersion RuntimeOperationAction = "remove_local_environment_version" )
type RuntimeOperationStage ¶
type RuntimeOperationStage string
const ( RuntimeOperationStagePreparing RuntimeOperationStage = "preparing" RuntimeOperationStageReceiving RuntimeOperationStage = "receiving" RuntimeOperationStageVerifying RuntimeOperationStage = "verifying" RuntimeOperationStageInstalling RuntimeOperationStage = "installing" RuntimeOperationStageRemoving RuntimeOperationStage = "removing" RuntimeOperationStageValidating RuntimeOperationStage = "validating" RuntimeOperationStageFinalizing RuntimeOperationStage = "finalizing" )
type RuntimeOperationState ¶
type RuntimeOperationState string
const ( RuntimeOperationStateIdle RuntimeOperationState = "idle" RuntimeOperationStateRunning RuntimeOperationState = "running" RuntimeOperationStateSucceeded RuntimeOperationState = "succeeded" RuntimeOperationStateFailed RuntimeOperationState = "failed" RuntimeOperationStateCancelled RuntimeOperationState = "cancelled" )
type RuntimeOperationStatus ¶
type RuntimeOperationStatus struct {
Action RuntimeOperationAction `json:"action,omitempty"`
State RuntimeOperationState `json:"state"`
Stage RuntimeOperationStage `json:"stage,omitempty"`
TargetVersion string `json:"target_version,omitempty"`
LastError string `json:"last_error,omitempty"`
LastErrorCode string `json:"last_error_code,omitempty"`
StartedAtUnixMs int64 `json:"started_at_unix_ms,omitempty"`
FinishedAtUnixMs int64 `json:"finished_at_unix_ms,omitempty"`
LogTail []string `json:"log_tail,omitempty"`
}
type RuntimeStatus ¶
type RuntimeStatus struct {
ActiveRuntime RuntimeTargetStatus `json:"active_runtime"`
ManagedRuntime RuntimeTargetStatus `json:"managed_runtime"`
ManagedPrefix string `json:"managed_prefix"`
ManagedRuntimeVersion string `json:"managed_runtime_version,omitempty"`
ManagedRuntimeSource string `json:"managed_runtime_source"`
InstalledVersions []RuntimeInstalledVersionStatus `json:"installed_versions,omitempty"`
Platform WorkspaceEnginePlatform `json:"platform"`
Operation RuntimeOperationStatus `json:"operation"`
UpdatedAtUnixMs int64 `json:"updated_at_unix_ms"`
}
type RuntimeTargetStatus ¶
type RuntimeTargetStatus struct {
DetectionState RuntimeDetectionState `json:"detection_state"`
Present bool `json:"present"`
Source string `json:"source"`
BinaryPath string `json:"binary_path,omitempty"`
Version string `json:"version,omitempty"`
ErrorCode string `json:"error_code,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
}
type WorkspaceEngineArchive ¶ added in v0.6.10
type WorkspaceEngineArchiveLayout ¶ added in v0.6.10
type WorkspaceEngineArtifactManifest ¶ added in v0.6.10
type WorkspaceEngineArtifactManifest struct {
SchemaVersion int `json:"schema_version"`
Engine string `json:"engine"`
Version string `json:"version"`
Source WorkspaceEngineArtifactSource `json:"source"`
Platform WorkspaceEnginePlatform `json:"platform"`
Archive WorkspaceEngineArchive `json:"archive"`
Layout WorkspaceEngineArchiveLayout `json:"layout"`
}
type WorkspaceEngineArtifactSource ¶ added in v0.6.10
type WorkspaceEngineImportChunkResult ¶ added in v0.6.10
type WorkspaceEngineImportSession ¶ added in v0.6.10
type WorkspaceEngineImportSession struct {
UploadID string `json:"upload_id"`
OperationID string `json:"operation_id"`
Manifest WorkspaceEngineArtifactManifest `json:"manifest"`
State string `json:"state"`
ReceivedBytes int64 `json:"received_bytes"`
ExpectedBytes int64 `json:"expected_bytes"`
ChunkSizeBytes int64 `json:"chunk_size_bytes"`
NextChunkIndex int64 `json:"next_chunk_index"`
CreatedAtUnixMS int64 `json:"created_at_unix_ms"`
ExpiresAtUnixMS int64 `json:"expires_at_unix_ms"`
}
type WorkspaceEnginePlatform ¶ added in v0.6.10
type WorkspaceEnginePlatform struct {
OS string `json:"os"`
Arch string `json:"arch"`
Libc string `json:"libc,omitempty"`
LibcVersion string `json:"libc_version,omitempty"`
PlatformID string `json:"platform_id"`
Supported bool `json:"supported"`
UnsupportedCode string `json:"unsupported_code,omitempty"`
Message string `json:"message,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.