UNPKG

the-moby-effect

Version:
47 lines (46 loc) 2.66 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContainerHealthConfig = void 0; var Schema = _interopRequireWildcard(require("effect/Schema")); var MobySchemas = _interopRequireWildcard(require("../schemas/index.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 ContainerHealthConfig extends /*#__PURE__*/Schema.Class("ContainerHealthConfig")({ // Test is the test to perform to check that the container is healthy. // An empty slice means to inherit the default. // The options are: // {} : inherit healthcheck // {"NONE"} : disable healthcheck // {"CMD", args...} : exec arguments directly // {"CMD-SHELL", command} : run command with system's default shell Test: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), { nullable: true }), /** Interval is the time to wait between checks. */ Interval: /*#__PURE__*/Schema.optional(MobySchemas.Int64), /** * Timeout is the time to wait before considering the check to have * hung. */ Timeout: /*#__PURE__*/Schema.optional(MobySchemas.Int64), /** * The start period for the container to initialize before the retries * starts to count down. */ StartPeriod: /*#__PURE__*/Schema.optional(MobySchemas.Int64), /** The interval to attempt health checks at during the start period */ StartInterval: /*#__PURE__*/Schema.optional(MobySchemas.Int64), /** * Retries is the number of consecutive failures needed to consider a * container as unhealthy. */ Retries: /*#__PURE__*/Schema.optional(MobySchemas.Int64) }, { identifier: "ContainerHealthConfig", title: "v1.HealthcheckConfig", documentation: "https://github.com/moby/docker-image-spec/blob/f1d00ebd2d6d6805170d5543dbca4b850f35f9af/specs-go/v1/image.go#L34-L54" }) {} exports.ContainerHealthConfig = ContainerHealthConfig; //# sourceMappingURL=ContainerHealthConfig.generated.js.map