node-consul-service 1.0.74 → 1.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/consul/atlasDiscovery.d.ts +5 -0
- package/dist/consul/client.d.ts +0 -2
- package/dist/consul/registry.d.ts +0 -9
- package/dist/consul/types.d.ts +6 -0
- package/dist/index.cjs.js +29 -1278
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +30 -1277
- package/dist/utils/logger.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AtlasServiceInstance } from './types';
|
|
2
|
+
export declare function listServices(): Promise<any[]>;
|
|
3
|
+
export declare function getServiceInstances(serviceName: string): Promise<AtlasServiceInstance[]>;
|
|
4
|
+
export declare function getRandomServiceInstance(serviceName: string): Promise<AtlasServiceInstance>;
|
|
5
|
+
export declare function getServiceUrl(serviceName: string): Promise<string>;
|
package/dist/consul/client.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Consul from 'consul';
|
|
2
1
|
import { AtlasClient } from '../atlas/atlas.client';
|
|
3
2
|
export interface ConsulClientOptions {
|
|
4
3
|
host?: string;
|
|
@@ -8,4 +7,3 @@ export interface ConsulClientOptions {
|
|
|
8
7
|
export declare function toBoolean(value?: string | boolean | null): boolean;
|
|
9
8
|
export declare function initClient({ host, port, secure }: ConsulClientOptions): void;
|
|
10
9
|
export declare function getAtlasClient(): AtlasClient;
|
|
11
|
-
export declare function getClient(): Consul;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
type RegisterOptions = {
|
|
2
2
|
name: string;
|
|
3
|
-
id: string;
|
|
4
3
|
port: number;
|
|
5
4
|
address?: string;
|
|
6
|
-
check?: {
|
|
7
|
-
name?: string;
|
|
8
|
-
http?: string;
|
|
9
|
-
interval?: string;
|
|
10
|
-
timeout?: string;
|
|
11
|
-
deregistercriticalserviceafter?: string;
|
|
12
|
-
} | false;
|
|
13
5
|
tags?: string[];
|
|
14
6
|
meta?: Record<string, string>;
|
|
15
7
|
};
|
|
16
8
|
export declare function registerService(options: RegisterOptions): Promise<void>;
|
|
17
|
-
export declare function deregisterService(id: string): Promise<void>;
|
|
18
9
|
export {};
|