mirror of
https://github.com/docker/compose.git
synced 2026-09-27 18:00:08 +00:00
docs(provider): document the demo endpoint subprocess deliberate lifetime
The serve-demo subprocess is the demo's provisioned resource: it must outlive the provider invocation — consumers reach it through the relay after up returns — and it reaps itself after three minutes. Spell that out where a reader (or reviewer) would otherwise expect a Kill/Wait. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
39193657eb
commit
60cf6fc02f
1 changed files with 7 additions and 0 deletions
|
|
@ -188,6 +188,13 @@ func up(options options, args []string) {
|
|||
fmt.Printf(`{ "type": "error", "message": "demo endpoint did not come up: %v" }%s`, err, lineSeparator)
|
||||
return
|
||||
}
|
||||
// The subprocess deliberately outlives this invocation — it IS the
|
||||
// provisioned resource the relay forwards to, and consumers connect
|
||||
// through it only after up has returned, so reaping it here would
|
||||
// tear the endpoint down before anyone reached it. Its lifetime is
|
||||
// its own: it exits by itself after three minutes (serve-demo), the
|
||||
// way a real provider's resource outlives the provider CLI run.
|
||||
//
|
||||
// the endpoint is announced as seen from THIS process's host —
|
||||
// the relay translates loopback into the container-visible name
|
||||
_, port, _ := net.SplitHostPort(strings.TrimSpace(addr))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue