HostDiscovery
Home > @backstage/backend-app-api
> HostDiscovery
HostDiscovery is a basic PluginEndpointDiscovery implementation that can handle plugins that are hosted in a single or multiple deployments.
The deployment may be scaled horizontally, as long as the external URL is the same for all instances. However, internal URLs will always be resolved to the same host, so there won't be any balancing of internal traffic.
Signature:
class HostDiscovery implements DiscoveryService
Implements: DiscoveryService
Methods
Method | Modifiers | Description |
---|---|---|
fromConfig(config, options) | static | Creates a new HostDiscovery discovery instance by reading from the Can be overridden in config by providing a target and corresponding plugins in |
discovery:
endpoints:
- target: https://internal.example.com/internal-catalog
plugins: [catalog]
- target: https://internal.example.com/secure/api/{{pluginId}}
plugins: [auth, permission]
- target:
internal: https://internal.example.com/search
external: https://example.com/search
plugins: [search]
The basePath defaults to /api
, meaning the default full internal path for the catalog
plugin will be http://localhost:7007/api/catalog
.