diff options
Diffstat (limited to 'src/canary/testable.ts')
| -rw-r--r-- | src/canary/testable.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/canary/testable.ts b/src/canary/testable.ts new file mode 100644 index 0000000..d79aa99 --- /dev/null +++ b/src/canary/testable.ts @@ -0,0 +1,24 @@ +import type { TaskEither } from "fp-ts/lib/TaskEither"; +import type { Job } from "./job"; +import type { D } from "../util"; + +export enum TestType { + EMAIL = "email", + PING = "ping", + HEALTHCHECK = "healthcheck", + DNS = "dns", +} + +export interface Schedule { + every: D.Duration; + jitter: D.Duration; +} + +export interface Test { + name: string; + type: TestType; + job: Job; + schedule: Schedule; +} + +export type Testable<T extends Job> = (job: T) => TaskEither<Error, boolean>; |
