method ConsulProvider.prototype.mapEntries
ConsulProvider.prototype.mapEntries(
body: unknown,
serviceName: string
): readonly ServiceInstance[]

Maps a health response body onto instances.

Parameters

body: unknown

The parsed JSON array

serviceName: string

Fallback service name when the entry omits one

Return Type

readonly ServiceInstance[]

The mapped instances

Usage

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