import type nconf from "nconf" ; import { ILogger } from "./lambdas" ; /**
 * A runner represents a task that starts once start is called. And ends when either start completes
 * or stop is called.
 */ export interface IRunner { /**
     * Starts the runner
     */ start ( logger ) : Promise < void > ; /**
     * Stops the runner
     */ stop ( ) : Promise < void > ; } /**
 * Base interfaces for resources that can be provided to a runner
 */ export interface IResources { /**
     * Disposes fo the resources
     */ dispose ( ) : Promise < void > ; } /**
 * A resource factory is used to create the resources needed by a runner
 */ export interface IResourcesFactory < T extends IResources > { /**
     * Creates a new set of resources
     */ create ( config ) : Promise < T > ; } /**
 * A runner factory is used to create new runners
 */ export interface IRunnerFactory < T > { /**
     * Creates a new runner
     */ create ( resources ) : Promise < IRunner > ; }