From 2f2a9bed0dcf55786236012af6105e746bf3d785 Mon Sep 17 00:00:00 2001 From: Matheus Oliveira <99829531+omatheusmesmo@users.noreply.github.com> Date: Tue, 15 Sep 2026 14:45:46 -0300 Subject: [PATCH] docs(core): list the current callers in the ContainerReachableEndpoint Javadoc (#3682) The class is shared by LaunchedContainerAwsEnv, EC2 and CloudFormation, not only Lambda. Follow-up to the #3579 review. Signed-off-by: Matheus Oliveira --- .../docker/ContainerReachableEndpoint.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/io/github/hectorvent/floci/core/common/docker/ContainerReachableEndpoint.java b/src/main/java/io/github/hectorvent/floci/core/common/docker/ContainerReachableEndpoint.java index 9347d79fc4..1dbde68256 100644 --- a/src/main/java/io/github/hectorvent/floci/core/common/docker/ContainerReachableEndpoint.java +++ b/src/main/java/io/github/hectorvent/floci/core/common/docker/ContainerReachableEndpoint.java @@ -8,17 +8,24 @@ import jakarta.inject.Inject; import java.net.URI; /** - * Computes the Floci base URL reachable from inside a Lambda container. + * Computes the Floci base URL reachable from inside a Docker container that Floci launches. * - *

When the embedded DNS server is active, Lambda containers have it wired as their - * resolver and can reach Floci by the configured hostname (or the default DNS suffix). - * Otherwise we fall back to the raw Docker host address (e.g. {@code host.docker.internal} - * or the bridge IP) resolved by {@link DockerHostResolver}. + *

When the embedded DNS server is active, containers built with + * {@code ContainerBuilder.Builder.withEmbeddedDns()} have it wired as their resolver and can reach Floci by + * the configured hostname (or the default DNS suffix). Otherwise we fall back to the raw Docker host + * address (e.g. {@code host.docker.internal} or the bridge IP) resolved by {@link DockerHostResolver}. * - *

This is the address that must back any URL handed to a Lambda for a callback — - * most notably the {@code ResponseURL} a CloudFormation custom resource PUTs its result to. - * Extracted from {@code ContainerLauncher} so both the launcher and the CloudFormation - * provisioner share one definition of "how a container reaches Floci". + *

This is the single definition of "how a container reaches Floci", shared by: + *

+ * + *

Kubernetes pods do not use it: {@code KubernetesFlociAddressResolver} builds their endpoint + * without the embedded DNS server. */ @ApplicationScoped public class ContainerReachableEndpoint { @@ -36,7 +43,7 @@ public class ContainerReachableEndpoint { this.embeddedDnsServer = embeddedDnsServer; } - /** The Floci {@code http://host:port} base URL reachable from inside a Lambda container. */ + /** The Floci {@code http://host:port} base URL reachable from inside a launched Docker container. */ public String baseUrl() { int flociPort = URI.create(config.baseUrl()).getPort(); String flociHostname = embeddedDnsServer.getServerIp().isPresent()