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 RuntimeAdapterCatalogDocument
- type RuntimeAdapterCatalogEntry
- 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 RuntimeAdapterCatalogDocument ¶
type RuntimeAdapterCatalogDocument struct {
Version string `json:"version"`
ProtocolVersion string `json:"protocol_version"`
Adapters []RuntimeAdapterCatalogEntry `json:"adapters"`
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 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.