Intervention

sealed class Intervention(source)

A typed change to one run configuration. Applying it edits the capsule the container is synthesized from, so the Dockerfile, the run.sh flags and the manifest all follow from the same code as reproduce. The attributes it changes are recorded by the edit, not declared by hand. Every value is the capsule's own spelling (120000 100000 for a cpu limit).

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class PinDependency(val name: String, val version: String) : Intervention

Pins one dependency in the workspace lockfile; the container installs from it.

Link copied to clipboard
data class SetCpuAffinity(val count: String) : Intervention

Restricts the CPUs the container may run on, the count in cpu.affinity.

Link copied to clipboard
data class SetCpuLimit(val value: String) : Intervention
Link copied to clipboard
data class SetEnv(val name: String, val value: String) : Intervention
Link copied to clipboard
data class SetFile(val path: String, val content: String?) : Intervention

Adds or replaces a workspace file (Intervention.SetFile.content set), or deletes it (null).

Link copied to clipboard
data class SetFlag(val flag: String, val present: Boolean) : Intervention

Adds or removes one -x or --x token of the test command.

Link copied to clipboard
data class SetHosts(val entries: String) : Intervention

Sets the custom hosts entries ([email protected], comma separated); blank removes them.

Link copied to clipboard
data class SetLocale(val name: String, val value: String) : Intervention
Link copied to clipboard
data class SetMemoryLimit(val value: String) : Intervention
Link copied to clipboard
data class SetNetwork(val interfaces: String) : Intervention

Sets the network interfaces the container has, the sorted list in network.interfaces.

Link copied to clipboard
data class SetNsswitch(val hosts: String) : Intervention

Sets the sources of the hosts database in /etc/nsswitch.conf, such as files dns.

Link copied to clipboard
data class SetOs(val distro: String, val release: String) : Intervention

Changes the distribution release, which in a container is the base image tag.

Link copied to clipboard
data class SetPin(val path: String, val value: String) : Intervention

Sets a project pin that the arm carries as a workspace file (see WorkspacePins).

Link copied to clipboard
data class SetPlatform(val platform: String) : Intervention

Declares the platform the program under test runs on, as DRIFT_RUNTIME_PLATFORM does for a capture. run.sh passes the variable, and the workspace decides which build that selects.

Link copied to clipboard
data class SetRuntime(val tool: String, val version: String) : Intervention

Changes a toolchain version, which in a container is the base image tag.

Link copied to clipboard
data class SetShell(val flavor: String) : Intervention

Links /bin/sh to another shell; the flavor is the name of the link target.

Link copied to clipboard
data class SetTimezone(val zone: String) : Intervention
Link copied to clipboard
data class SetUlimit(val name: String, val value: String) : Intervention
Link copied to clipboard
data class SetUserland(val flavor: String) : Intervention

Sets the userland flavor, gnu or busybox; on Alpine gnu installs the GNU tools.

Link copied to clipboard
data class ToggleStep(val step: String, val present: Boolean) : Intervention

Adds or removes a workflow step; a container has no steps.

Link copied to clipboard
data class UnsetEnv(val name: String) : Intervention

Properties

Link copied to clipboard
val id: String
Link copied to clipboard
abstract val params: List<Pair<String, String>>
Link copied to clipboard
abstract val type: String

Functions

Link copied to clipboard
abstract fun describe(): String
Link copied to clipboard
open fun toJson(): JsonObject
Link copied to clipboard
open fun unsupported(environment: Environment): String?

Why this cannot run in environment, or null.