genericworker

package
v63.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONSchema

func JSONSchema() string

Returns json schema for the payload part of the task definition. Please note we use a go string and do not load an external file, since we want this to be *part of the compiled executable*. If this sat in another file that was loaded at runtime, it would not be burned into the build, which would be bad for the following two reasons:

  1. we could no longer distribute a single binary file that didn't require installation/extraction
  2. the payload schema is specific to the version of the code, therefore should be versioned directly with the code and *frozen on build*.

Run `generic-worker show-payload-schema` to output this schema to standard out.

Types

type Artifact

type Artifact struct {

	// Content-Encoding for the artifact. If not provided, `gzip` will be used, except for the
	// following file extensions, where `identity` will be used, since they are already
	// compressed:
	//
	// * 7z
	// * bz2
	// * deb
	// * dmg
	// * flv
	// * gif
	// * gz
	// * jpeg
	// * jpg
	// * png
	// * swf
	// * tbz
	// * tgz
	// * webp
	// * whl
	// * woff
	// * woff2
	// * xz
	// * zip
	// * zst
	//
	// Note, setting `contentEncoding` on a directory artifact will apply the same content
	// encoding to all the files contained in the directory.
	//
	// Since: generic-worker 16.2.0
	//
	// Possible values:
	//   * "identity"
	//   * "gzip"
	ContentEncoding string `json:"contentEncoding,omitempty"`

	// Explicitly set the value of the HTTP `Content-Type` response header when the artifact(s)
	// is/are served over HTTP(S). If not provided (this property is optional) the worker will
	// guess the content type of artifacts based on the filename extension of the file storing
	// the artifact content. It does this by looking at the system filename-to-mimetype mappings
	// defined in multiple `mime.types` files located under `/etc`. Note, setting `contentType`
	// on a directory artifact will apply the same contentType to all files contained in the
	// directory.
	//
	// See [mime.TypeByExtension](https://pkg.go.dev/mime#TypeByExtension).
	//
	// Since: generic-worker 10.4.0
	ContentType string `json:"contentType,omitempty"`

	// Date when artifact should expire must be in the future, no earlier than task deadline, but
	// no later than task expiry. If not set, defaults to task expiry.
	//
	// Since: generic-worker 1.0.0
	Expires tcclient.Time `json:"expires,omitempty"`

	// Name of the artifact, as it will be published. If not set, `path` will be used.
	// Conventionally (although not enforced) path elements are forward slash separated. Example:
	// `public/build/a/house`. Note, no scopes are required to read artifacts beginning `public/`.
	// Artifact names not beginning `public/` are scope-protected (caller requires scopes to
	// download the artifact). See the Queue documentation for more information.
	//
	// Since: generic-worker 8.1.0
	Name string `json:"name,omitempty"`

	// Relative path of the file/directory from the task directory. Note this is not an absolute
	// path as is typically used in docker-worker, since the absolute task directory name is not
	// known when the task is submitted. Example: `dist\regedit.exe`. It doesn't matter if
	// forward slashes or backslashes are used.
	//
	// Since: generic-worker 1.0.0
	Path string `json:"path"`

	// Artifacts can be either an individual `file` or a `directory` containing
	// potentially multiple files with recursively included subdirectories.
	//
	// Since: generic-worker 1.0.0
	//
	// Possible values:
	//   * "file"
	//   * "directory"
	Type string `json:"type"`
}

type ArtifactContent

type ArtifactContent struct {

	// Max length: 1024
	Artifact string `json:"artifact"`

	// If provided, the required SHA256 of the content body.
	//
	// Since: generic-worker 10.8.0
	//
	// Syntax:     ^[a-f0-9]{64}$
	SHA256 string `json:"sha256,omitempty"`

	// Syntax:     ^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$
	TaskID string `json:"taskId"`
}

Requires scope `queue:get-artifact:<artifact-name>`.

Since: generic-worker 5.4.0

type Base64Content

type Base64Content struct {

	// Base64 encoded content of file/archive, up to 64KB (encoded) in size.
	//
	// Since: generic-worker 11.1.0
	//
	// Syntax:     ^[A-Za-z0-9/+]+[=]{0,2}$
	// Max length: 65536
	Base64 string `json:"base64"`
}

Base64 encoded content of file/archive, up to 64KB (encoded) in size.

Since: generic-worker 11.1.0

type Capabilities

type Capabilities struct {

	// Allows devices from the host system to be attached to a task container similar to using `--device` in docker.
	Devices Devices `json:"devices,omitempty"`

	// Allowed a task to run without seccomp, similar to running docker with `--security-opt seccomp=unconfined`.  This only worked for worker-types configured to enable it. NO LONGER SUPPORTED IN DOCKER WORKER, but payload still includes feature in order for d2g to work with it.
	//
	// Default:    false
	DisableSeccomp bool `json:"disableSeccomp" default:"false"`

	// Allows a task to run in a privileged container, similar to running docker with `--privileged`.  This only works for worker-types configured to enable it.
	//
	// Default:    false
	Privileged bool `json:"privileged" default:"false"`
}

Set of capabilities that must be enabled or made available to the task container Example: ```{ "capabilities": { "privileged": true }```

type Devices

type Devices struct {

	// Mount /dev/shm from the host in the container.
	HostSharedMemory bool `json:"hostSharedMemory,omitempty"`

	// Mount /dev/kvm from the host in the container.
	KVM bool `json:"kvm,omitempty"`

	// Audio loopback device created using snd-aloop
	LoopbackAudio bool `json:"loopbackAudio,omitempty"`

	// Video loopback device created using v4l2loopback.
	LoopbackVideo bool `json:"loopbackVideo,omitempty"`
}

Allows devices from the host system to be attached to a task container similar to using `--device` in docker.

type DockerImageArtifact

type DockerImageArtifact struct {
	Path string `json:"path"`

	TaskID string `json:"taskId"`

	// Possible values:
	//   * "task-image"
	Type string `json:"type"`
}

Image to use for the task. Images can be specified as an image tag as used by a docker registry, or as an object declaring type and name/namespace

type DockerImageName

type DockerImageName string

Image to use for the task. Images can be specified as an image tag as used by a docker registry, or as an object declaring type and name/namespace

type DockerWorkerArtifact

type DockerWorkerArtifact struct {
	Expires tcclient.Time `json:"expires,omitempty"`

	Path string `json:"path"`

	// Possible values:
	//   * "file"
	//   * "directory"
	Type string `json:"type"`
}

type DockerWorkerFeatureFlags

type DockerWorkerFeatureFlags struct {

	// This allows you to use the Linux ptrace functionality inside the container; it is otherwise disallowed by Docker's security policy.
	//
	// Default:    false
	AllowPtrace bool `json:"allowPtrace" default:"false"`

	// Default:    true
	Artifacts bool `json:"artifacts" default:"true"`

	// Useful if live logging is not interesting but the overalllog is later on
	//
	// Default:    true
	BulkLog bool `json:"bulkLog" default:"true"`

	// Artifacts named chain-of-trust.json and chain-of-trust.json.sig should be generated which will include information for downstream tasks to build a level of trust for the artifacts produced by the task and the environment it ran in.
	//
	// Default:    false
	ChainOfTrust bool `json:"chainOfTrust" default:"false"`

	// Runs docker-in-docker and binds `/var/run/docker.sock` into the container. Doesn't allow privileged mode, capabilities or host volume mounts.
	//
	// Default:    false
	Dind bool `json:"dind" default:"false"`

	// Uploads docker images as artifacts
	//
	// Default:    false
	DockerSave bool `json:"dockerSave" default:"false"`

	// This allows you to interactively run commands inside the container and attaches you to the stdin/stdout/stderr over a websocket. Can be used for SSH-like access to docker containers.
	//
	// Default:    false
	Interactive bool `json:"interactive" default:"false"`

	// Logs are stored on the worker during the duration of tasks and available via http chunked streaming then uploaded to s3
	//
	// Default:    true
	LocalLiveLog bool `json:"localLiveLog" default:"true"`

	// The auth proxy allows making requests to taskcluster/queue and taskcluster/scheduler directly from your task with the same scopes as set in the task. This can be used to make api calls via the [client](https://github.com/taskcluster/taskcluster-client) CURL, etc... Without embedding credentials in the task.
	//
	// Default:    false
	TaskclusterProxy bool `json:"taskclusterProxy" default:"false"`
}

Used to enable additional functionality.

type DockerWorkerPayload

type DockerWorkerPayload struct {

	// Artifact upload map example: “`{"public/build.tar.gz": {"path": "/home/worker/build.tar.gz", "expires": "2016-05-28T16:12:56.693817Z", "type": "file"}}“`
	Artifacts map[string]DockerWorkerArtifact `json:"artifacts,omitempty"`

	// Caches are mounted within the docker container at the mount point specified. Example: “`{ "CACHE NAME": "/mount/path/in/container" }“`
	//
	// Map entries:
	Cache map[string]string `json:"cache,omitempty"`

	// Set of capabilities that must be enabled or made available to the task container Example: “`{ "capabilities": { "privileged": true }“`
	Capabilities Capabilities `json:"capabilities,omitempty"`

	// Example: `['/bin/bash', '-c', 'ls']`.
	//
	// Default:    []
	//
	// Array items:
	Command []string `json:"command,omitempty"`

	// Example: “`
	// {
	//   "PATH": '/borked/path'
	//   "ENV_NAME": "VALUE"
	// }
	// “`
	//
	// Map entries:
	Env map[string]string `json:"env,omitempty"`

	// Used to enable additional functionality.
	Features DockerWorkerFeatureFlags `json:"features,omitempty"`

	// Image to use for the task.  Images can be specified as an image tag as used by a docker registry, or as an object declaring type and name/namespace
	//
	// One of:
	//   * DockerImageName
	//   * NamedDockerImage
	//   * IndexedDockerImage
	//   * DockerImageArtifact
	Image json.RawMessage `json:"image"`

	// Specifies a custom name for the livelog artifact. Note that this is also used in determining the name of the backing log artifact name. Backing log artifact name matches livelog artifact name with `_backing` appended, prior to the file extension (if present). For example, `apple/banana.log.txt` results in livelog artifact `apple/banana.log.txt` and backing log artifact `apple/banana.log_backing.txt`. Defaults to `public/logs/live.log`.
	//
	// Default:    "public/logs/live.log"
	Log string `json:"log" default:"public/logs/live.log"`

	// Maximum time the task container can run in seconds.
	//
	// Mininum:    1
	// Maximum:    86400
	MaxRunTime int64 `json:"maxRunTime"`

	// By default docker-worker will fail a task with a non-zero exit status without retrying.  This payload property allows a task owner to define certain exit statuses that will be marked as a retriable exception.
	OnExitStatus ExitStatusHandling `json:"onExitStatus,omitempty"`

	// Maintained for backward compatibility, but no longer used
	SupersederURL string `json:"supersederUrl,omitempty"`
}

`.payload` field of the queue.

type ExitCodeHandling

type ExitCodeHandling struct {

	// If the task exits with a purge caches exit status, all caches
	// associated with the task will be purged.
	//
	// Since: generic-worker 49.0.0
	//
	// Array items:
	// Mininum:    0
	PurgeCaches []int64 `json:"purgeCaches,omitempty"`

	// Exit codes for any command in the task payload to cause this task to
	// be resolved as `exception/intermittent-task`. Typically the Queue
	// will then schedule a new run of the existing `taskId` (rerun) if not
	// all task runs have been exhausted.
	//
	// See [itermittent tasks](https://docs.taskcluster.net/docs/reference/platform/taskcluster-queue/docs/worker-interaction#intermittent-tasks) for more detail.
	//
	// Since: generic-worker 10.10.0
	//
	// Array items:
	// Mininum:    1
	Retry []int64 `json:"retry,omitempty"`
}

By default tasks will be resolved with `state/reasonResolved`: `completed/completed` if all task commands have a zero exit code, or `failed/failed` if any command has a non-zero exit code. This payload property allows customsation of the task resolution based on exit code of task commands.

type ExitStatusHandling

type ExitStatusHandling struct {

	// If the task exits with a purge caches exit status, all caches associated with the task will be purged.
	//
	// Array items:
	PurgeCaches []int64 `json:"purgeCaches,omitempty"`

	// If the task exits with a retriable exit status, the task will be marked as an exception and a new run created.
	//
	// Array items:
	Retry []int64 `json:"retry,omitempty"`
}

By default docker-worker will fail a task with a non-zero exit status without retrying. This payload property allows a task owner to define certain exit statuses that will be marked as a retriable exception.

type FeatureFlags

type FeatureFlags struct {

	// The backing log feature publishes a task artifact containing the complete
	// stderr and stdout of the task.
	//
	// Since: generic-worker 48.2.0
	//
	// Default:    true
	BackingLog bool `json:"backingLog" default:"true"`

	// Artifacts named `public/chain-of-trust.json` and
	// `public/chain-of-trust.json.sig` should be generated which will
	// include information for downstream tasks to build a level of trust
	// for the artifacts produced by the task and the environment it ran in.
	//
	// Since: generic-worker 5.3.0
	ChainOfTrust bool `json:"chainOfTrust,omitempty"`

	// This allows you to interactively run commands from within the worker
	// as the task user. This may be useful for debugging purposes.
	// Can be used for SSH-like access to the running worker.
	// Note that this feature works differently from the `interactive` feature
	// in docker worker, which `docker exec`s into the running container.
	// Since tasks on generic worker are not guaranteed to be running in a
	// container, a bash shell is started on the task user's account.
	// A user can then `docker exec` into the a running container, if there
	// is one.
	//
	// Since: generic-worker 49.2.0
	Interactive bool `json:"interactive,omitempty"`

	// The live log feature streams the combined stderr and stdout to a task artifact
	// so that the output is available while the task is running.
	//
	// Since: generic-worker 48.2.0
	//
	// Default:    true
	LiveLog bool `json:"liveLog" default:"true"`

	// Audio loopback device created using snd-aloop.
	// An audio device will be available for the task. Its
	// location will be `/dev/snd`. Devices inside that directory
	// will take the form `/dev/snd/controlC<N>`,
	// `/dev/snd/pcmC<N>D0c`, `/dev/snd/pcmC<N>D0p`,
	// `/dev/snd/pcmC<N>D1c`, and `/dev/snd/pcmC<N>D1p`,
	// where <N> is an integer between 0 and 31, inclusive.
	// The Generic Worker config setting `loopbackAudioDeviceNumber`
	// may be used to change the device number in case the
	// default value (`16`) conflicts with another
	// audio device on the worker.
	//
	// This feature is only available on Linux. If a task
	// is submitted with this feature enabled on a non-Linux,
	// posix platform (FreeBSD, macOS), the task will resolve as
	// `exception/malformed-payload`.
	//
	// Since: generic-worker 54.5.0
	LoopbackAudio bool `json:"loopbackAudio,omitempty"`

	// Video loopback device created using v4l2loopback.
	// A video device will be available for the task. Its
	// location will be passed to the task via environment
	// variable `TASKCLUSTER_VIDEO_DEVICE`. The
	// location will be `/dev/video<N>` where `<N>` is
	// an integer between 0 and 255. The value of `<N>`
	// is not static, and therefore either the environment
	// variable should be used, or `/dev` should be
	// scanned in order to determine the correct location.
	// Tasks should not assume a constant value.
	//
	// This feature is only available on Linux. If a task
	// is submitted with this feature enabled on a non-Linux,
	// posix platform (FreeBSD, macOS), the task will resolve as
	// `exception/malformed-payload`.
	//
	// Since: generic-worker 53.1.0
	LoopbackVideo bool `json:"loopbackVideo,omitempty"`

	// The taskcluster proxy provides an easy and safe way to make authenticated
	// taskcluster requests within the scope(s) of a particular task. See
	// [the github project](https://github.com/taskcluster/taskcluster/tree/main/tools/taskcluster-proxy) for more information.
	//
	// Since: generic-worker 10.6.0
	TaskclusterProxy bool `json:"taskclusterProxy,omitempty"`
}

Feature flags enable additional functionality.

Since: generic-worker 5.3.0

type FileMount

type FileMount struct {

	// One of:
	//   * ArtifactContent
	//   * IndexedContent
	//   * URLContent
	//   * RawContent
	//   * Base64Content
	Content json.RawMessage `json:"content"`

	// The filesystem location to mount the file.
	//
	// Since: generic-worker 5.4.0
	File string `json:"file"`

	// Compression format of the preloaded content.
	//
	// Since: generic-worker 55.3.0
	//
	// Possible values:
	//   * "bz2"
	//   * "gz"
	//   * "lz4"
	//   * "xz"
	//   * "zst"
	Format string `json:"format,omitempty"`
}

type GenericWorkerPayload

type GenericWorkerPayload struct {

	// Artifacts to be published.
	//
	// Since: generic-worker 1.0.0
	Artifacts []Artifact `json:"artifacts,omitempty"`

	// One array per command (each command is an array of arguments). Several arrays
	// for several commands.
	//
	// Since: generic-worker 0.0.1
	//
	// Array items:
	// Array items:
	Command [][]string `json:"command"`

	// Env vars must be string to __string__ mappings (not number or boolean). For example:
	// “`
	// {
	//   "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
	//   "GOOS": "darwin",
	//   "FOO_ENABLE": "true",
	//   "BAR_TOTAL": "3"
	// }
	// “`
	//
	// Note, the following environment variables will automatically be set in the task
	// commands, but may be overridden by environment variables in the task payload:
	//   * `HOME` - the home directory of the task user
	//   * `PATH` - `/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin`
	//   * `USER` - the name of the task user
	//
	// The following environment variables will automatically be set in the task
	// commands, and may not be overridden by environment variables in the task payload:
	//   * `DISPLAY` - `:0` (Linux only)
	//   * `TASK_ID` - the task ID of the currently running task
	//   * `RUN_ID` - the run ID of the currently running task
	//   * `TASKCLUSTER_ROOT_URL` - the root URL of the taskcluster deployment
	//   * `TASKCLUSTER_PROXY_URL` (if taskcluster proxy feature enabled) - the
	//     taskcluster authentication proxy for making unauthenticated taskcluster
	//     API calls
	//   * `TASK_USER_CREDENTIALS` (if config property `runTasksAsCurrentUser` set to
	//     `true` in `generic-worker.config` file - the absolute file location of a
	//     json file containing the current task OS user account name and password.
	//     This is only useful for the generic-worker multiuser CI tasks, where
	//     `runTasksAsCurrentUser` is set to `true`.
	//   * `TASKCLUSTER_WORKER_LOCATION`. See
	//     [RFC #0148](https://github.com/taskcluster/taskcluster-rfcs/blob/master/rfcs/0148-taskcluster-worker-location.md)
	//     for details.
	//
	// Since: generic-worker 0.0.1
	//
	// Map entries:
	Env map[string]string `json:"env,omitempty"`

	// Feature flags enable additional functionality.
	//
	// Since: generic-worker 5.3.0
	Features FeatureFlags `json:"features,omitempty"`

	// Configuration for task logs.
	//
	// Since: generic-worker 48.2.0
	Logs Logs `json:"logs,omitempty"`

	// Maximum time the task container can run in seconds.
	// The maximum value for `maxRunTime` is set by a `maxTaskRunTime` config property specific to each worker-pool.
	//
	// Since: generic-worker 0.0.1
	//
	// Mininum:    1
	MaxRunTime int64 `json:"maxRunTime"`

	// Directories and/or files to be mounted.
	//
	// Since: generic-worker 5.4.0
	//
	// Array items:
	// One of:
	//   * FileMount
	//   * WritableDirectoryCache
	//   * ReadOnlyDirectory
	Mounts []json.RawMessage `json:"mounts,omitempty"`

	// By default tasks will be resolved with `state/reasonResolved`: `completed/completed`
	// if all task commands have a zero exit code, or `failed/failed` if any command has a
	// non-zero exit code. This payload property allows customsation of the task resolution
	// based on exit code of task commands.
	OnExitStatus ExitCodeHandling `json:"onExitStatus,omitempty"`

	// A list of OS Groups that the task user should be a member of.
	//
	// Since: generic-worker 6.0.0 (Windows)
	// Since: generic-worker 54.4.0 (FreeBSD, Linux, macOS)
	//
	// Array items:
	OSGroups []string `json:"osGroups,omitempty"`

	// This property is allowed for backward compatibility, but is unused.
	SupersederURL string `json:"supersederUrl,omitempty"`
}

This schema defines the structure of the `payload` property referred to in a Taskcluster Task definition.

type IndexedContent

type IndexedContent struct {

	// Max length: 1024
	Artifact string `json:"artifact"`

	// Max length: 255
	Namespace string `json:"namespace"`
}

Content originating from a task artifact that has been indexed by the Taskcluster Index Service.

Since: generic-worker 51.0.0

type IndexedDockerImage

type IndexedDockerImage struct {
	Namespace string `json:"namespace"`

	Path string `json:"path"`

	// Possible values:
	//   * "indexed-image"
	Type string `json:"type"`
}

Image to use for the task. Images can be specified as an image tag as used by a docker registry, or as an object declaring type and name/namespace

type Logs

type Logs struct {

	// Specifies a custom name for the backing log artifact.
	// This is only used if `features.backingLog` is `true`.
	//
	// Since: generic-worker 48.2.0
	//
	// Default:    "public/logs/live_backing.log"
	Backing string `json:"backing" default:"public/logs/live_backing.log"`

	// Specifies a custom name for the live log artifact.
	// This is only used if `features.liveLog` is `true`.
	//
	// Since: generic-worker 48.2.0
	//
	// Default:    "public/logs/live.log"
	Live string `json:"live" default:"public/logs/live.log"`
}

Configuration for task logs.

Since: generic-worker 48.2.0

type NamedDockerImage

type NamedDockerImage struct {
	Name string `json:"name"`

	// Possible values:
	//   * "docker-image"
	Type string `json:"type"`
}

Image to use for the task. Images can be specified as an image tag as used by a docker registry, or as an object declaring type and name/namespace

type Payload

type Payload json.RawMessage

One of:

  • GenericWorkerPayload
  • DockerWorkerPayload

func (*Payload) MarshalJSON

func (m *Payload) MarshalJSON() ([]byte, error)

MarshalJSON calls json.RawMessage method of the same name. Required since Payload is of type json.RawMessage...

func (*Payload) UnmarshalJSON

func (m *Payload) UnmarshalJSON(data []byte) error

UnmarshalJSON is a copy of the json.RawMessage implementation.

type RawContent

type RawContent struct {

	// Byte-for-byte literal inline content of file/archive, up to 64KB in size.
	//
	// Since: generic-worker 11.1.0
	//
	// Max length: 65536
	Raw string `json:"raw"`
}

Byte-for-byte literal inline content of file/archive, up to 64KB in size.

Since: generic-worker 11.1.0

type ReadOnlyDirectory

type ReadOnlyDirectory struct {

	// One of:
	//   * ArtifactContent
	//   * IndexedContent
	//   * URLContent
	//   * RawContent
	//   * Base64Content
	Content json.RawMessage `json:"content"`

	// The filesystem location to mount the directory volume.
	//
	// Since: generic-worker 5.4.0
	Directory string `json:"directory"`

	// Archive format of content for read only directory.
	//
	// Since: generic-worker 5.4.0
	//
	// Possible values:
	//   * "rar"
	//   * "tar.bz2"
	//   * "tar.gz"
	//   * "tar.lz4"
	//   * "tar.xz"
	//   * "tar.zst"
	//   * "zip"
	Format string `json:"format"`
}

type URLContent

type URLContent struct {

	// If provided, the required SHA256 of the content body.
	//
	// Since: generic-worker 10.8.0
	//
	// Syntax:     ^[a-f0-9]{64}$
	SHA256 string `json:"sha256,omitempty"`

	// URL to download content from.
	//
	// Since: generic-worker 5.4.0
	URL string `json:"url"`
}

URL to download content from.

Since: generic-worker 5.4.0

type WritableDirectoryCache

type WritableDirectoryCache struct {

	// Implies a read/write cache directory volume. A unique name for the
	// cache volume. Requires scope `generic-worker:cache:<cache-name>`.
	// Note if this cache is loaded from an artifact, you will also require
	// scope `queue:get-artifact:<artifact-name>` to use this cache.
	//
	// Since: generic-worker 5.4.0
	CacheName string `json:"cacheName"`

	// One of:
	//   * ArtifactContent
	//   * IndexedContent
	//   * URLContent
	//   * RawContent
	//   * Base64Content
	Content json.RawMessage `json:"content,omitempty"`

	// The filesystem location to mount the directory volume.
	//
	// Since: generic-worker 5.4.0
	Directory string `json:"directory"`

	// Archive format of the preloaded content (if `content` provided).
	//
	// Since: generic-worker 5.4.0
	//
	// Possible values:
	//   * "rar"
	//   * "tar.bz2"
	//   * "tar.gz"
	//   * "tar.lz4"
	//   * "tar.xz"
	//   * "tar.zst"
	//   * "zip"
	Format string `json:"format,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL