the-moby-effect
Version:
Moby/Docker API client built using effect-ts
69 lines (68 loc) • 3.88 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ClusterVolumeSpec = void 0;
var Schema = _interopRequireWildcard(require("effect/Schema"));
var VolumeAccessMode = _interopRequireWildcard(require("./VolumeAccessMode.generated.js"));
var VolumeCapacityRange = _interopRequireWildcard(require("./VolumeCapacityRange.generated.js"));
var VolumeSecret = _interopRequireWildcard(require("./VolumeSecret.generated.js"));
var VolumeTopologyRequirement = _interopRequireWildcard(require("./VolumeTopologyRequirement.generated.js"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
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"
}) {}
exports.ClusterVolumeSpec = ClusterVolumeSpec;
//# sourceMappingURL=ClusterVolumeSpec.generated.js.map