// Package rollout is the box's rollout scheduler (zero-downtime deploys spec // §6, §8, §10). It decides which instance moves to which build, when, in which // swap mode, and what happens when a build fails. It is armed only by // CARLOS_SWAP=overlap. With the flag unset nothing in this package runs, and // the box keeps today's stop-then-wake paths. package rollout import "strings" // SwapEnv is the box flag (spec §15). const SwapEnv = "CARLOS_SWAP" // Enabled reports whether the box flag arms the scheduler. Only the exact // word "overlap" does: a typo must leave the box on today's paths, not on a // half-understood new one. func Enabled(getenv func(string) string) bool { return strings.TrimSpace(getenv(SwapEnv)) == "overlap" }