UNPKG

the-moby-effect

Version:
60 lines 2.82 kB
import * as Schema from "effect/Schema"; import * as VolumeAccessMode from "./VolumeAccessMode.generated.js"; import * as VolumeCapacityRange from "./VolumeCapacityRange.generated.js"; import * as VolumeSecret from "./VolumeSecret.generated.js"; import * as VolumeTopologyRequirement from "./VolumeTopologyRequirement.generated.js"; export class ClusterVolumeSpec extends /*#__PURE__*/Schema.Class("ClusterVolumeSpec")({ /** * Group defines the volume group of this volume. Volumes belonging to * the same group can be referred to by group name when creating * Services. Referring to a volume by group instructs swarm to treat * volumes in that group interchangeably for the purpose of scheduling. * Volumes with an empty string for a group technically all belong to * the same, empty string group. */ Group: /*#__PURE__*/Schema.optional(Schema.String), /** AccessMode defines how the volume is used by tasks. */ AccessMode: /*#__PURE__*/Schema.optionalWith(VolumeAccessMode.VolumeAccessMode, { nullable: true }), /** * AccessibilityRequirements specifies where in the cluster a volume * must be accessible from. * * This field must be empty if the plugin does not support * VOLUME_ACCESSIBILITY_CONSTRAINTS capabilities. If it is present but * the plugin does not support it, volume will not be created. * * If AccessibilityRequirements is empty, but the plugin does support * VOLUME_ACCESSIBILITY_CONSTRAINTS, then Swarm kit will assume the * entire cluster is a valid target for the volume. */ AccessibilityRequirements: /*#__PURE__*/Schema.optionalWith(VolumeTopologyRequirement.VolumeTopologyRequirement, { nullable: true }), /** * CapacityRange defines the desired capacity that the volume should be * created with. If nil, the plugin will decide the capacity. */ CapacityRange: /*#__PURE__*/Schema.optionalWith(VolumeCapacityRange.VolumeCapacityRange, { nullable: true }), /** * Secrets defines Swarm Secrets that are passed to the CSI storage * plugin when operating on this volume. */ Secrets: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(VolumeSecret.VolumeSecret)), { nullable: true }), /** * Availability is the Volume's desired availability. Analogous to Node * Availability, this allows the user to take volumes offline in order * to update or delete them. */ Availability: /*#__PURE__*/Schema.optional(/*#__PURE__*/Schema.Literal("active", "pause", "drain")) }, { identifier: "ClusterVolumeSpec", title: "volume.ClusterVolumeSpec", documentation: "https:*github.com/moby/moby/blob/a21b1a2d12e2c01542cb191eb526d7bfad0641e3/api/types/volume/cluster_volume.go#L29-L66" }) {} //# sourceMappingURL=ClusterVolumeSpec.generated.js.map