Documentation
¶
Index ¶
- Constants
- func CleanContainerPath(value string) string
- func CommandRuntimeEnv(workload core.CommandWorkload, resolved map[string]string) (map[string]string, error)
- func ContainerBuildEnv(workload core.ContainerBuildWorkload, resolved map[string]string) (map[string]string, error)
- func DirectorySize(root string) int64
- func ParseSandboxedContainerBuildDigestMarker(output []byte) string
- func ReadSandboxedContainerBuildDigest(path string) (string, error)
- func ResolveContainerBuildPaths(workspace string, workload core.ContainerBuildWorkload) (string, string, error)
- func SandboxedCommandContract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
- func SandboxedContainerBuildContract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
- func ValidSHA256Digest(value string) bool
- type ContainerRuntimeScope
- type DockerCommandRunner
- type DockerSandboxRuntime
- type ExecDockerCommandRunner
- type ExecRuntimeCommandRunner
- type RuntimeAdapterCatalogDocument
- type RuntimeAdapterCatalogEntry
- type RuntimeBackendCatalogEntry
- type RuntimeBackendProbe
- type RuntimeBackendProbeOptions
- type RuntimeCommandResult
- type RuntimeCommandRunner
- type SandboxMount
- type SandboxRunRequest
- type SandboxRunResult
- type SandboxRuntime
- type SandboxRuntimeCommandAdapter
- type SandboxRuntimeContainerBuildAdapter
- type SandboxedCommandInvocationOptions
- type SandboxedCommandRuntime
- type SandboxedCommandRuntimeInvocation
- type SandboxedContainerBuildInvocationOptions
- type SandboxedContainerBuildRuntime
- type SandboxedContainerBuildRuntimeInvocation
Constants ¶
View Source
const ( SandboxedCommandProviderName = "sandboxed-command" SandboxedCommandOperationRun = "run-sandboxed-command" SandboxedContainerBuildProviderName = "sandboxed-container-build" SandboxedContainerBuildOperation = "build-sandboxed-container" SandboxNetworkNone = "none" SandboxNetworkBridge = "bridge" SandboxedContainerBuildStateDir = "/wfcompute-build" SandboxedContainerBuildDigestPath = SandboxedContainerBuildStateDir + "/wfcompute-container-build-digest" SandboxedContainerBuildDigestMarker = "WORKFLOW_COMPUTE_BUILD_DIGEST=" )
Variables ¶
This section is empty.
Functions ¶
func CleanContainerPath ¶
func CommandRuntimeEnv ¶
func ContainerBuildEnv ¶
func DirectorySize ¶
func SandboxedCommandContract ¶
func SandboxedCommandContract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
func SandboxedContainerBuildContract ¶
func SandboxedContainerBuildContract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
func ValidSHA256Digest ¶
Types ¶
type ContainerRuntimeScope ¶
type ContainerRuntimeScope struct {
Args []string
}
type DockerCommandRunner ¶ added in v0.2.0
type DockerSandboxRuntime ¶ added in v0.2.0
type DockerSandboxRuntime struct {
Tool string
RuntimeName string
Runner DockerCommandRunner
}
func (DockerSandboxRuntime) Available ¶ added in v0.2.0
func (r DockerSandboxRuntime) Available(ctx context.Context) error
func (DockerSandboxRuntime) Run ¶ added in v0.2.0
func (r DockerSandboxRuntime) Run(ctx context.Context, req SandboxRunRequest) (SandboxRunResult, error)
type ExecDockerCommandRunner ¶ added in v0.2.0
type ExecDockerCommandRunner struct{}
type ExecRuntimeCommandRunner ¶ added in v0.2.0
type ExecRuntimeCommandRunner struct{}
func (ExecRuntimeCommandRunner) LookPath ¶ added in v0.2.0
func (ExecRuntimeCommandRunner) LookPath(name string) (string, error)
func (ExecRuntimeCommandRunner) Run ¶ added in v0.2.0
func (ExecRuntimeCommandRunner) Run(ctx context.Context, name string, args ...string) (RuntimeCommandResult, error)
type RuntimeAdapterCatalogDocument ¶
type RuntimeAdapterCatalogDocument struct {
Version string `json:"version"`
ProtocolVersion string `json:"protocol_version"`
Adapters []RuntimeAdapterCatalogEntry `json:"adapters"`
RuntimeBackends []RuntimeBackendCatalogEntry `json:"runtime_backends,omitempty"`
HostOwnedResponsibilities []string `json:"host_owned_responsibilities"`
}
func (RuntimeAdapterCatalogDocument) Validate ¶
func (d RuntimeAdapterCatalogDocument) Validate() error
type RuntimeAdapterCatalogEntry ¶
type RuntimeAdapterCatalogEntry struct {
AdapterID string `json:"adapter_id"`
Operation string `json:"operation"`
Kinds []core.RuntimeAdapterKind `json:"kinds"`
WorkloadKinds []core.WorkloadKind `json:"workload_kinds"`
RuntimeProfiles []core.RuntimeProfile `json:"runtime_profiles"`
WorkspacePolicy core.RuntimeWorkspacePolicy `json:"workspace_policy"`
ConformanceProfiles []string `json:"conformance_profiles"`
}
func (RuntimeAdapterCatalogEntry) Contract ¶
func (e RuntimeAdapterCatalogEntry) Contract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
func (RuntimeAdapterCatalogEntry) Validate ¶
func (e RuntimeAdapterCatalogEntry) Validate() error
type RuntimeBackendCatalogEntry ¶ added in v0.2.0
type RuntimeBackendCatalogEntry struct {
BackendID string `json:"backend_id"`
Families []core.RuntimeBackendFamily `json:"families"`
Tools []core.ContainerRuntimeTool `json:"tools"`
IsolationModes []core.RuntimeIsolationMode `json:"isolation_modes"`
InstallBurdens []core.RuntimeInstallBurden `json:"install_burdens"`
RuntimeProfiles []core.RuntimeProfile `json:"runtime_profiles"`
ExecutorProviders []string `json:"executor_providers"`
ConformanceProfiles []string `json:"conformance_profiles"`
}
func (RuntimeBackendCatalogEntry) Validate ¶ added in v0.2.0
func (e RuntimeBackendCatalogEntry) Validate() error
type RuntimeBackendProbe ¶ added in v0.2.0
type RuntimeBackendProbe struct {
Options RuntimeBackendProbeOptions
Runner RuntimeCommandRunner
}
func DockerCompatibleRuntimeProbes ¶ added in v0.2.0
func DockerCompatibleRuntimeProbes(runner RuntimeCommandRunner, generatedAt time.Time) []RuntimeBackendProbe
func (RuntimeBackendProbe) Probe ¶ added in v0.2.0
func (p RuntimeBackendProbe) Probe(ctx context.Context) core.RuntimeBackendReport
type RuntimeBackendProbeOptions ¶ added in v0.2.0
type RuntimeBackendProbeOptions struct {
BackendID string
Family core.RuntimeBackendFamily
Tool core.ContainerRuntimeTool
Command string
VersionArgs []string
ConformanceImage string
ConformanceCommand []string
ConformanceWorkspace string
IsolationMode core.RuntimeIsolationMode
InstallBurden core.RuntimeInstallBurden
RuntimeProfiles []core.RuntimeProfile
ConformanceProfiles []string
GeneratedAt time.Time
}
type RuntimeCommandResult ¶ added in v0.2.0
type RuntimeCommandRunner ¶ added in v0.2.0
type SandboxMount ¶
type SandboxRunRequest ¶
type SandboxRunRequest struct {
Image string
Command []string
RuntimeScope ContainerRuntimeScope
Stdin []byte
Workspace string
WorkingDir string
Env map[string]string
Network string
RuntimeName string
RunAsRoot bool
WritableRootFS bool
AddCapabilities []string
ExtraTmpfs []string
DataMounts []SandboxMount
Timeout time.Duration
Limits core.ResourceLimits
}
type SandboxRunResult ¶
type SandboxRuntime ¶
type SandboxRuntime interface {
Available(context.Context) error
Run(context.Context, SandboxRunRequest) (SandboxRunResult, error)
}
type SandboxRuntimeCommandAdapter ¶
type SandboxRuntimeCommandAdapter struct {
Runtime SandboxRuntime
}
func (SandboxRuntimeCommandAdapter) RunSandboxedCommand ¶
func (a SandboxRuntimeCommandAdapter) RunSandboxedCommand(ctx context.Context, invocation SandboxedCommandRuntimeInvocation) (core.RuntimeExecutionResult, error)
type SandboxRuntimeContainerBuildAdapter ¶
type SandboxRuntimeContainerBuildAdapter struct {
Runtime SandboxRuntime
}
func (SandboxRuntimeContainerBuildAdapter) BuildSandboxedContainer ¶
func (a SandboxRuntimeContainerBuildAdapter) BuildSandboxedContainer(ctx context.Context, invocation SandboxedContainerBuildRuntimeInvocation) (core.RuntimeExecutionResult, error)
type SandboxedCommandRuntime ¶
type SandboxedCommandRuntime interface {
RunSandboxedCommand(context.Context, SandboxedCommandRuntimeInvocation) (core.RuntimeExecutionResult, error)
}
type SandboxedCommandRuntimeInvocation ¶
type SandboxedCommandRuntimeInvocation struct {
Request core.RuntimeExecutionRequest
Image string
Workspace string
Network string
Timeout time.Duration
TimeoutLimitHit string
}
func NewSandboxedCommandInvocation ¶
func NewSandboxedCommandInvocation(opts SandboxedCommandInvocationOptions) (SandboxedCommandRuntimeInvocation, error)
type SandboxedContainerBuildRuntime ¶
type SandboxedContainerBuildRuntime interface {
BuildSandboxedContainer(context.Context, SandboxedContainerBuildRuntimeInvocation) (core.RuntimeExecutionResult, error)
}
type SandboxedContainerBuildRuntimeInvocation ¶
type SandboxedContainerBuildRuntimeInvocation struct {
Request core.RuntimeExecutionRequest
Image string
Workspace string
Network string
Timeout time.Duration
TimeoutLimitHit string
}
func NewSandboxedContainerBuildInvocation ¶
func NewSandboxedContainerBuildInvocation(opts SandboxedContainerBuildInvocationOptions) (SandboxedContainerBuildRuntimeInvocation, error)
Click to show internal directories.
Click to hide internal directories.