Skip to main content

Module resolve

Module resolve 

Source
Expand description

Port of internal/clusterdomain/resolve.go: settles cluster.network.cluster_domain against the zone the cluster actually serves.

xianyun_core::config::container::Container now carries the global.cluster_domain/global.cluster_domain_source fields this module reads and writes (added since this crate’s Phase 3 scaffold was written), so this is a direct port against the real type rather than the local shim the original scaffold anticipated needing.

Enums§

ResolveError
Port of clusterdomain.ErrClusterDomainUnknown and the cluster.ErrConfigMismatch/cluster.ErrClusterNotRunning sentinels Resolve/ResolveRunning wrap.

Constants§

CONFIGURED_SOURCE
Port of clusterdomain.ConfiguredSource.

Functions§

configured_domain
Port of clusterdomain.configuredDomain: returns cluster.network.cluster_domain, or "" when unset.
resolve
Port of clusterdomain.Resolve: settles cluster.network.cluster_domain against the zone sources_for(mgr) discovers through reader, and records the outcome on cfg.
resolve_and_reload
Port of clusterdomain.ResolveAndReload: resolves the domain, then reloads the config so ${CAPRONI_CLUSTER_DOMAIN} expands with it.
resolve_running
Port of clusterdomain.ResolveRunning: Resolve for commands that never start a cluster. Returns (skipped, err): skipped carries the “cluster is not running, kept the configured value” case, err is a hard failure.

Type Aliases§

Connector
Port of clusterdomain.Connector: opens a DNS reader on a cluster that is known to be running.