mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-23 23:42:29 +00:00
20a83e8e0a
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
32 lines
840 B
TypeScript
32 lines
840 B
TypeScript
import { EventEmitter } from 'events';
|
|
import { Router } from 'express';
|
|
|
|
import ApplicationManager from './application-manager';
|
|
import Config from './config';
|
|
import Database from './db';
|
|
import DeviceConfig from './device-config';
|
|
import EventTracker from './event-tracker';
|
|
import Logger from './logger';
|
|
|
|
// This is a very incomplete definition of the device state
|
|
// class, which should be rewritten in typescript soon
|
|
class DeviceState extends EventEmitter {
|
|
public applications: ApplicationManager;
|
|
public router: Router;
|
|
public deviceConfig: DeviceConfig;
|
|
|
|
public constructor(args: {
|
|
config: Config;
|
|
db: Database;
|
|
eventTracker: EventTracker;
|
|
logger: Logger;
|
|
});
|
|
|
|
public healthcheck(): Promise<void>;
|
|
public normaliseLegacy(client: PinejsClientRequest): Promise<void>;
|
|
|
|
public async init();
|
|
}
|
|
|
|
export = DeviceState;
|