uptime/src/canary/job.ts

42 lines
751 B
TypeScript

import { D } from "../util";
export interface PingJob {
hosts: string[];
}
export interface Retry {
retries: number;
interval: D.Duration;
}
export interface HealthCheckJob {
healthcheck_routes: string[];
}
export interface DnsJob {
resolutions: { [key: string]: string };
}
export interface EmailInstruction {
email: string;
username: string;
password: string;
server: string;
}
export interface EmailFromInstruction extends EmailInstruction {
send_port: number;
}
export interface EmailToInstruction extends EmailInstruction {
read_port: number;
}
export interface EmailJob {
from: EmailFromInstruction;
to: EmailToInstruction;
readRetry: Retry;
}
export type Job = EmailJob | PingJob | HealthCheckJob | DnsJob;