method ConsulProvider.prototype.resolve
ConsulProvider.prototype.resolve(serviceName: string): Promise<readonly ServiceInstance[]>

Reads the current instance list for a service.

Parameters

serviceName: string

Logical service name

Return Type

Promise<readonly ServiceInstance[]>

Every instance the backend reports, possibly empty

Throws

Error

If the backend cannot be read

Usage

import { ConsulProvider } from "service-discovery-plugin/src/index.ts";