interface StaticServiceDefinition
Since 0.2.0

One entry of a 'static' service list.

Properties

readonly
optional
id: string

Instance id. Synthesized as <host>:<port> when omitted.

readonly
host: string

Hostname or IP literal.

readonly
port: number

TCP port.

readonly
optional
secure: boolean

Whether the instance speaks TLS.

readonly
optional
weight: number

Relative selection weight for 'weighted-random'.

readonly
optional
tags: readonly string[]

Labels.

readonly
optional
metadata: Readonly<Record<string, string>>

Key/value metadata.

Usage

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