diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-07-21 15:41:56 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-07-21 15:41:56 -0700 |
| commit | 452c41a75aa2f9036614d677fda3867221db959e (patch) | |
| tree | 98f2ee2ccd0858a120c5cd618641615f0fc5e026 /src/canary/testable.ts | |
| download | mon.hatecomputers.club-452c41a75aa2f9036614d677fda3867221db959e.tar.gz mon.hatecomputers.club-452c41a75aa2f9036614d677fda3867221db959e.zip | |
add a simple email job
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>; |
