UNPKG

the-moby-effect

Version:
89 lines (88 loc) 5.43 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContainerResources = void 0; var Schema = _interopRequireWildcard(require("effect/Schema")); var MobySchemas = _interopRequireWildcard(require("../schemas/index.js")); var ContainerDeviceMapping = _interopRequireWildcard(require("./ContainerDeviceMapping.generated.js")); var ContainerDeviceRequest = _interopRequireWildcard(require("./ContainerDeviceRequest.generated.js")); var ContainerUlimit = _interopRequireWildcard(require("./ContainerUlimit.generated.js")); var ThrottleDevice = _interopRequireWildcard(require("./ThrottleDevice.generated.js")); var WeightDevice = _interopRequireWildcard(require("./WeightDevice.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 ContainerResources extends /*#__PURE__*/Schema.Class("ContainerResources")({ // Applicable to all platforms /** CPU shares (relative weight vs. other containers) */ CpuShares: MobySchemas.Int64, /** Memory limit (in bytes) */ Memory: MobySchemas.Int64, /** CPU quota */ NanoCpus: MobySchemas.Int64, // Applicable to UNIX platforms /** Parent cgroup. */ CgroupParent: Schema.String, /** Block IO weight (relative weight vs. other containers) */ BlkioWeight: MobySchemas.UInt16, BlkioWeightDevice: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(WeightDevice.WeightDevice))), BlkioDeviceReadBps: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(ThrottleDevice.ThrottleDevice))), BlkioDeviceWriteBps: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(ThrottleDevice.ThrottleDevice))), BlkioDeviceReadIOps: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(ThrottleDevice.ThrottleDevice))), BlkioDeviceWriteIOps: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(ThrottleDevice.ThrottleDevice))), /** CPU CFS (Completely Fair Scheduler) period */ CpuPeriod: MobySchemas.Int64, /** CPU CFS (Completely Fair Scheduler) quota */ CpuQuota: MobySchemas.Int64, /** CPU real-time period */ CpuRealtimePeriod: MobySchemas.Int64, /** CPU real-time runtime */ CpuRealtimeRuntime: MobySchemas.Int64, /** CpusetCpus 0-2, 0,1 */ CpusetCpus: Schema.String, /** CpusetMems 0-2, 0,1 */ CpusetMems: Schema.String, /** List of devices to map inside the container */ Devices: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(ContainerDeviceMapping.ContainerDeviceMapping))), /** List of rule to be added to the device cgroup */ DeviceCgroupRules: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(Schema.String)), /** List of device requests for device drivers */ DeviceRequests: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(ContainerDeviceRequest.ContainerDeviceRequest))), /** * KernelMemory specifies the kernel memory limit (in bytes) for the * container. Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes. */ KernelMemory: /*#__PURE__*/Schema.optional(MobySchemas.Int64), /** Hard limit for kernel TCP buffer memory (in bytes) */ KernelMemoryTCP: /*#__PURE__*/Schema.optional(MobySchemas.Int64), /** Memory soft limit (in bytes) */ MemoryReservation: MobySchemas.Int64, /** Total memory usage (memory + swap); set `-1` to enable unlimited swap */ MemorySwap: MobySchemas.Int64, /** Tuning container memory swappiness behaviour */ MemorySwappiness: /*#__PURE__*/Schema.NullOr(MobySchemas.Int64), /** Whether to disable OOM Killer or not */ OomKillDisable: /*#__PURE__*/Schema.NullOr(Schema.Boolean), /** * Setting PIDs limit for a container; Set `0` or `-1` for unlimited, or * `null` to not change. */ PidsLimit: /*#__PURE__*/Schema.NullOr(MobySchemas.Int64), /** List of ulimits to be set in the container */ Ulimits: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(/*#__PURE__*/Schema.NullOr(ContainerUlimit.ContainerUlimit))), // Applicable to Windows /** Cpu count */ CpuCount: MobySchemas.Int64, /** CPU percent */ CpuPercent: MobySchemas.Int64, /** Maximum IOps for the container system drive */ IOMaximumIOps: MobySchemas.UInt64, /** Maximum IO in bytes per second for the container system drive */ IOMaximumBandwidth: MobySchemas.UInt64 }, { identifier: "ContainerResources", title: "container.Resources", documentation: "https://github.com/moby/moby/blob/a21b1a2d12e2c01542cb191eb526d7bfad0641e3/api/types/container/hostconfig.go#L369-L410" }) {} exports.ContainerResources = ContainerResources; //# sourceMappingURL=ContainerResources.generated.js.map