@khulnasoft/cdk
Version:
Define your observability as code using the AWS CDK
58 lines • 1.76 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.lte = exports.lt = exports.gte = exports.gt = exports.neq = exports.eq = void 0;
/**
* Triggers alert where calculation result equals the value.
* @param {number} value The value used in the comparison
* @returns {Object} A threshold object
*/
function eq(value) {
return { value, operation: "=" };
}
exports.eq = eq;
/**
* Triggers alert where calculation result does not equal the value.
* @param {number} value The value used in the comparison
* @returns {Object} A threshold object
*/
function neq(value) {
return { value, operation: "!=" };
}
exports.neq = neq;
/**
* Triggers alert where calculation result is greater than the value.
* @param {number} value The value used in the comparison
* @returns {Object} A threshold object
*/
function gt(value) {
return { value, operation: ">" };
}
exports.gt = gt;
/**
* Triggers alert where calculation result is greater than or equal to the value.
* @param {number} value The value used in the comparison
* @returns {Object} A threshold object
*/
function gte(value) {
return { value, operation: ">=" };
}
exports.gte = gte;
/**
* Triggers alert where calculation result is less than the value.
* @param {number} value The value used in the comparison
* @returns {Object} A threshold object
*/
function lt(value) {
return { value, operation: "<" };
}
exports.lt = lt;
/**
* Triggers alert where calculation result is less than or equal to the value.
* @param {number} value The value used in the comparison
* @returns {Object} A threshold object
*/
function lte(value) {
return { value, operation: "<=" };
}
exports.lte = lte;
//# sourceMappingURL=threshold.js.map