You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
maestro/app/classes/state/os/IsAliveState.js

26 lines
570 B

const State = require('../State')
class IsAliveState extends State {
async apply() {
throw new Error('IsAliveState cannot be applied. It is a check measure only.')
}
async check() {
return this._host.is_alive()
}
async reverse() {
throw new Error('IsAliveState cannot be reversed. It is a check measure only.')
}
failure_message() {
return `Unable to connect to host "${this._host.name}".`
}
check_message() {
return this.failure_message()
}
}
module.exports = exports = IsAliveState