export interface PluginLike {
    call(identifier: string, ...args: any[]): Promise<any>;
    log(level: any, message: string): void;
}

export abstract class AbstractBackend {
    protected plugin: PluginLike;
    protected context: any;

    constructor(plugin: PluginLike, context: any) {
        this.plugin = plugin;
        this.context = context;
    }

    abstract init(): Promise<void>;
    abstract run(): void | Promise<void>;
    abstract stop(): void;
}