/guicedee-service-registry:guicedee-service-registryfrom guicedee-service-registry
Registers Guiced services by name, resolves URLs and aliases, and configures health-aware service discovery with periodic health checks.
Ships in guicedee-service-registry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Named service registry with health monitoring — register, discover, and resolve services by simple name.
The service registry maintains a map of name → URL + health status. Services are registered via annotations, auto-constructed from cloud DNS suffix, or provided by SPI plugins. Periodic health checks keep status current. The rest-client module can resolve registry:service-name URLs or bare service names at call time.
guiced.net:service-registry dependency.requires com.guicedee.service.registry; to module-info.java.package-info.java:
@ServiceRegistryOptions(healthCheckInterval = 30)
@RegisteredService(name = "jwebmp-website",
aliases = {"jwebmp", "jwebswing"},
externalUrls = {"https://jwebmp.com", "https://jwebswing.com"},
kubernetesUrl = "http://jwebmp-website.default.svc.cluster.local")
@RegisteredService(name = "payment-api", url = "${PAYMENT_URL}", healthPath = "/status")
@RegisteredService(name = "hello-service",
url = "http://hello-service.myns.svc.cluster.local",
healthPath = "/healthz")
package com.myapp;
String url = ServiceRegistry.url("jwebmp-website");
String url = ServiceRegistry.url("jwebmp"); // alias resolution
String ext = ServiceRegistry.externalUrl("jwebmp-website"); // → https://jwebmp.com
List<String> exts = ServiceRegistry.externalUrls("jwebmp-website");
String k8s = ServiceRegistry.kubernetesUrl("jwebmp-website");
Optional<String> healthy = ServiceRegistry.healthyUrl("jwebmp-website");
com.guicedee.service.registry
| Hook | Sort Order | What It Does |
|---|---|---|
ServiceRegistryPreStartup | MIN+150 | Scans annotations, constructs URLs, self-registers, runs SPI providers |
ServiceRegistryPostStartup | MIN+700 | Starts Vert.x periodic health check timer |
| Class | Package | Role |
|---|---|---|
ServiceRegistry | com.guicedee.service.registry | Central static registry — get(), url(), externalUrl(), externalUrls(), kubernetesUrl(), healthyUrl(), resolve(), register(), registerAlias() |
ServiceEntry | com.guicedee.service.registry | Record: name, url, externalUrls, kubernetesUrl, healthPath, status, lastChecked, metadata |
ServiceStatus | com.guicedee.service.registry | Enum: UP, DOWN, UNKNOWN, DEGRADED |
ServiceRegistryOptions | com.guicedee.service.registry | Annotation: healthCheckInterval, healthPath, registerSelf, useHttps, defaultPort |
RegisteredService | com.guicedee.service.registry | Annotation: declares a known service (repeatable) — name, url, healthPath, aliases, externalUrls, externalUrl, kubernetesUrl |
IServiceRegistryProvider | com.guicedee.service.registry | SPI for external catalogs (Azure API, Consul, static config) |
@RegisteredService(url = "...") is provided → use it (supports ${ENV_VAR} placeholders)CONTAINER_APP_ENV_DNS_SUFFIX env var (Azure Container Apps)runtime-autoconfigure extras.dnsSuffix (if on classpath)SERVICE_REGISTRY_DNS_SUFFIX env var (manual fallback)https://{name}.{dnsSuffix}aliases = {"jwebmp", "jwebswing"} — all resolve to the same service entryexternalUrls = {"https://jwebmp.com", "https://jwebswing.com"} — public custom domainsexternalUrl = "https://guicedee.com" — single external URL shorthandkubernetesUrl = "http://svc.ns.svc.cluster.local" — K8s internal cluster URLServiceRegistry.externalUrl("name") returns first external URL or falls back to internalServiceRegistry.kubernetesUrl("name") returns K8s URL or falls back to internalEach @RegisteredService can specify its own healthPath:
@RegisteredService(name = "legacy-app", healthPath = "/status")
@RegisteredService(name = "k8s-service", healthPath = "/healthz")
@RegisteredService(name = "standard-service") // uses registry default "/health/ready"
ServiceEntry.healthUrl() uses explicit healthUrl metadata when present; otherwise it normalizes the service URL and health path.
When registerSelf = true (default) and runtime-autoconfigure is on classpath:
RuntimeAutoConfigurePreStartup.current() to get serviceName, hostname, port{self: "true"}The registry is JVM-local state. Self-registration adds this process to its own registry; it does not publish a network catalogue or enumerate peers. DNS-suffix construction forms a URL for an already known name. Declare known peers with @RegisteredService, or use IServiceRegistryProvider to read the deployment's authoritative catalogue.
The separate service-discovery module resolves configured services through @ServiceResolverOptions or its provider SPI. Adding the dependency activates lifecycle discovery of that configuration; it does not supply the names, network configuration, or an automatically replicated registry. Check resolver configuration before assuming another process is discoverable.
Use registerInstance, unregisterInstance, and updateInstanceStatus for revision-specific entries. healthyInstances and latestHealthyInstance expose candidates; ServiceEntry.isHealthy() includes both UP and DEGRADED. Choose an explicit policy when a caller requires strictly UP. Registration and service health do not establish application identity, user consent, or authorization.
ServiceEntry.healthUrl(); self entries are skipped.trustAll=false, verifyHost=true); redirects are disabled.ServiceRegistryPostStartup when diagnosing unexpected UNKNOWN/DEGRADED results rather than equating all successful HTTP responses with readiness.@RegisteredService(healthUrl="...") supports a separate health listener. It must be an absolute HTTP(S) URL with a host, valid port, and no credentials, query, or fragment. The public service URL remains the request destination.HEALTH_DOWNSTREAM_ENABLED. An absent registry or empty catalogue is reported as up; it does not prove that required peers exist or that cluster quorum is ready.The rest-client auto-resolves from service registry (no hard dependency):
// Explicit registry: prefix
@Endpoint(url = "registry:jwebmp-website")
@Named("jwebmp") private RestClient<Void, Response> client;
// Bare service name (auto-detected if registered)
@Endpoint(url = "jwebmp-website")
@Named("jwebmp") private RestClient<Void, Response> client;
// Full URL (passes through unchanged)
@Endpoint(url = "https://api.example.com/v1")
@Named("example") private RestClient<Void, Response> client;
| Module | Maven artifact / module name | What It Adds |
|---|---|---|
runtime-autoconfigure | guiced.net:runtime-autoconfigure (com.guicedee.runtime.autoconfigure) | Self-registration + DNS suffix auto-detection across cloud platforms (AWS, Azure, GCP, K8s, Fly.io, Render, …) |
service-discovery | guiced.net:service-discovery (com.guicedee.vertx.servicediscovery) | Configured Vert.x service resolution via @ServiceResolverOptions / IServiceResolverProvider; configuration is loaded through lifecycle hooks |
| Property | Default | Purpose |
|---|---|---|
healthCheckInterval | 30 | Seconds between checks (0 = disabled) |
healthPath | "/health/ready" | Default health endpoint path |
registerSelf | true | Auto-register using runtime-autoconfigure |
healthCheckTimeout | 5000 | HTTP timeout in ms |
useHttps | true | HTTPS for auto-constructed URLs |
defaultPort | 0 | Port for auto-constructed URLs (0 = omit) |
| Property | Default | Purpose |
|---|---|---|
name | (required) | Simple logical service name |
url | "" | Full URL (empty = auto-construct from DNS suffix). Supports ${ENV_VAR} |
healthPath | "" | Health path override (empty = use registry default) |
healthUrl | "" | Explicit absolute health listener URL |
expectedStatusCode | 200 | Expected health response status |
expectedContentType | "application/json" | Health response evaluation mode |
aliases | {} | Alternative names that resolve to this service |
externalUrls | {} | External/public URLs (custom domains). Supports ${ENV_VAR} |
externalUrl | "" | Single external URL shorthand. Supports ${ENV_VAR} |
kubernetesUrl | "" | Kubernetes internal cluster URL. Supports ${ENV_VAR} |
public class AzureCatalogProvider implements IServiceRegistryProvider<AzureCatalogProvider> {
@Override
public List<ServiceEntry> discover() {
// Call Azure API, return container apps in environment
}
@Override
public String providerId() { return "azure-catalog"; }
}
Register in module-info.java:
provides IServiceRegistryProvider with AzureCatalogProvider;
Also register the provider in META-INF/services/com.guicedee.service.registry.IServiceRegistryProvider for classpath launches. Keep one owner for the peer catalogue and avoid duplicating discovery mechanisms with conflicting entries.
com.guicedee.service.registryIGuicePreStartup.onStartup() returns List<Future<Boolean>> (Vert.x Future)IGuicePostStartup.postLoad() returns List<Uni<Boolean>> (Mutiny Uni)io.vertx.web.clientio.vertx.webRuntimeAutoConfigurePreStartup (MIN+50) and after VertXPreStartupresolveEnvPlaceholders is public for cross-package accessWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub guicedee/ai-rules --plugin guicedee-service-registry