signalk-parquet
Version:
Vessel data Parquet file archive with automated value and geospatial triggers. History API compliant with cloud backups and queries.
57 lines • 1.93 kB
TypeScript
import { Context, Path, ServerAPI } from '@signalk/server-api';
import { PathConfig, PluginConfig, PluginState } from '../types';
export interface AutoDiscoveryResult {
configured: boolean;
path: string;
reason?: string;
}
export declare class AutoDiscoveryService {
private configuredCount;
private app;
private pluginConfig;
private state;
private currentPaths;
private configurationLock;
constructor(app: ServerAPI, pluginConfig: PluginConfig, state: PluginState, currentPaths: PathConfig[]);
/**
* Set the initial count of auto-discovered paths from existing config.
* Called during initialization to restore the counter.
*/
setInitialCount(count: number): void;
/**
* Get the current count of auto-configured paths
*/
getConfiguredCount(): number;
/**
* Update references when config/paths change
*/
updateReferences(pluginConfig: PluginConfig, currentPaths: PathConfig[]): void;
/**
* Main entry point: attempt to auto-configure a path if conditions are met.
* Called when a query returns no data for a path.
* Uses a lock to prevent race conditions on concurrent requests.
*/
maybeAutoConfigurePath(path: Path, context: Context): Promise<AutoDiscoveryResult>;
/**
* Internal implementation of auto-configure logic.
* Must only be called through the lock in maybeAutoConfigurePath.
*/
private doAutoConfigurePath;
/**
* Check if a path has live data in SignalK
*/
private checkPathHasLiveData;
/**
* Check if a path matches any of the given glob patterns
*/
private matchesPattern;
/**
* Configure a path for recording and update subscriptions
*/
private configurePath;
/**
* Generate a human-readable name from a SignalK path
*/
private generatePathName;
}
//# sourceMappingURL=auto-discovery.d.ts.map