UNPKG

2.39 kBTypeScriptView Raw
1import { ConnectOptions } from './cluster';
2/**
3 * IConfigProfile specifies a ConfigProfile which applies
4 * specified option values to ConnectionOptions.
5 *
6 * Volatile: This API is subject to change at any time.
7 */
8export interface IConfigProfile {
9 /**
10 * Applies the ConfigProfile options to the provided ConnectOptions.
11 *
12 * Volatile: This API is subject to change at any time.
13 *
14 * @param options The Connect options the ConfigProfile should be applied toward.
15 */
16 apply(options: ConnectOptions): void;
17}
18/**
19 * The WAN Development profile sets various timeout options that are useful
20 * when working in a WAN environment.
21 *
22 * Volatile: This API is subject to change at any time.
23 */
24export declare class WanDevelopmentProfile implements IConfigProfile {
25 /**
26 * Applies the ConfigProfile options to the provided ConnectOptions.
27 *
28 * Volatile: This API is subject to change at any time.
29 *
30 * @param options The Connect options the ConfigProfile should be applied toward.
31 */
32 apply(options: ConnectOptions): void;
33}
34/**
35 * The ConfigProfiles class keeps track of registered/known Configuration Profiles.
36 *
37 * Volatile: This API is subject to change at any time.
38 */
39export declare class ConfigProfiles {
40 private _profiles;
41 constructor();
42 /**
43 * Applies the specified registered ConfigProfile to the provided ConnectOptions.
44 *
45 * Volatile: This API is subject to change at any time.
46 *
47 * @param profileName The name of the ConfigProfile to apply.
48 * @param options The Connect options the ConfigProfile should be applied toward.
49 */
50 applyProfile(profileName: string, options: ConnectOptions): void;
51 /**
52 * Registers a ConfigProfile under the specified name.
53 *
54 * Volatile: This API is subject to change at any time.
55 *
56 * @param profileName The name the ConfigProfile should be registered under.
57 * @param profile The ConfigProfile to register.
58 */
59 registerProfile(profileName: string, profile: IConfigProfile): void;
60 /**
61 * Unregisters the specified ConfigProfile.
62 *
63 * Volatile: This API is subject to change at any time.
64 *
65 * @param profileName The name of the ConfigProfile to unregister.
66 */
67 unregisterProfile(profileName: string): void;
68}
69export declare const knownProfiles: ConfigProfiles;