UNPKG

signalk-server

Version:

An implementation of a [Signal K](http://signalk.org) server for boats.

96 lines 3.88 kB
import { ServerApp, SignalKMessageHub, WithConfig } from '../app'; import DeltaEditor from '../deltaeditor'; export interface Config { getExternalHostname: () => string; getExternalPort: () => number; isExternalSsl: () => boolean; port: number; appPath: string; configPath: string; name: string; author: string; contributors: string[]; version: string; description: string; vesselName: string; vesselUUID?: string; vesselMMSI?: string; baseDeltaEditor: DeltaEditor; hasOldDefaults: boolean; overrideTimestampWithNow: boolean; security: boolean; settings: { useBaseDeltas?: boolean; pipedProviders: any[]; interfaces?: { [ifaceName: string]: boolean; }; security?: any; ssl?: boolean; wsCompression?: boolean; wsPingInterval?: number | false; accessLogging?: boolean; landingPage?: string; proxy_host?: string; proxy_port?: number; proxy_ssl?: boolean; hostname?: string; pruneContextsMinutes?: number; mdns?: boolean; sslport?: number; port?: number; keepMostRecentLogsOnly?: boolean; logCountToKeep?: number; enablePluginLogging?: boolean; loggingDirectory?: string; /** Per-path explicit overrides. The engine consults this map first; * if a path has an entry here, that ranking is used. Includes the * fan-out sentinel `[{ sourceRef: '*', timeout: 0 }]` for paths the * user has marked as "deliver every source's value". Paths with no * entry here fall through to group resolution (see priorityGroups). */ priorityOverrides?: Record<string, Array<{ sourceRef: string; timeout: number; }>>; /** Ordered list of sources per priority group. The engine resolves * a path's ranking dynamically: if a delta's source is in an active * group, the group's ordering applies to the path. */ priorityGroups?: Array<{ id: string; sources: string[]; /** When true, the group is excluded from engine resolution — * paths whose only ranking would have come from this group accept * all sources first-come-first-served. Lets a user temporarily * disable a ranking without losing the order they configured. */ inactive?: boolean; }>; /** Global default fallback in ms applied to ranks below rank-1 * when the engine derives a path's ranking from a group. Per-path * overrides can still specify their own timeouts. */ priorityDefaults?: { fallbackMs?: number; }; /** Map of sourceRef → user-defined display alias for that source */ sourceAliases?: Record<string, string>; /** Map of "sourceRefA+sourceRefB" (sorted) → ISO timestamp when the * conflict was dismissed by the user */ ignoredInstanceConflicts?: Record<string, string>; trustProxy?: boolean | string | number; courseApi?: { apiOnly?: boolean; }; }; defaults: object; } export interface ConfigApp extends ServerApp, WithConfig, SignalKMessageHub { argv: any; env: any; } export declare function load(app: ConfigApp): void; export declare function readDefaultsFile(app: ConfigApp): any; export declare function sendBaseDeltas(app: ConfigApp): void; export declare function writeDefaultsFile(app: ConfigApp, defaults: any, cb: any): void; export declare function writeBaseDeltasFileSync(app: ConfigApp): void; export declare function writeBaseDeltasFile(app: ConfigApp): Promise<void>; export declare function writeSettingsFile(app: ConfigApp, settings: any, cb: any): void; //# sourceMappingURL=config.d.ts.map