UNPKG

@mindconnect/mindconnect-nodejs

Version:

MindConnect Library for NodeJS (community based)

27 lines (26 loc) 1.11 kB
import { IMindConnectConfiguration } from ".."; /** * Per default, the library stores the agent settings in the directory .mc * You can pass a class which implements a ConfigurationStorage in the constructor if you want to store * the settings somewhere else. (e.g. database, encrypted file system etc) * @export * @interface ConfigurationStorage */ export interface IConfigurationStorage { GetConfig(config: IMindConnectConfiguration): IMindConnectConfiguration; SaveConfig(config: IMindConnectConfiguration): Promise<IMindConnectConfiguration>; } export declare function IsConfigurationStorage(arg: any): arg is IConfigurationStorage; /** * DefaultStorage, stores the config files in the _basePath folder * * @export * @class DefaultStorage */ export declare class DefaultStorage implements IConfigurationStorage { private _basePath; private lock; GetConfig(configuration: IMindConnectConfiguration): IMindConnectConfiguration; SaveConfig(config: IMindConnectConfiguration): Promise<IMindConnectConfiguration>; constructor(_basePath: string); }