Expand description
gtc op traffic {set,show,rollback} (A3).
Manages Environment.traffic_splits: Vec<TrafficSplit>. Each split is
per-deployment_id. The CLI accepts percentages or basis points and
validates the entries sum to exactly 10,000 bps via
TrafficSplit::validate.
Rollback: the prior TrafficSplit is stashed inline under
previous_split_ref using the inline://<base64> token scheme from
greentic_deploy_spec::engine::inline_stash so rollback works without a
sidecar history file. Multi-step history is A8’s contract.
In-process router wiring (the RevisionDispatcher in greentic-start)
is Phase B. A3 only mutates the spec object; making it observable in the
live runtime is a separate gate.
Structs§
Functions§
- payload_
from_ set_ args - Build a
TrafficSetPayloadfrom clap-derived args. - payload_
from_ target_ args - Build a
TrafficShowPayloadforop traffic showandop traffic rollback. Same fallthrough semantics aspayload_from_set_args. - rollback
- set
op traffic set. Replaces the entire entries list for one deployment. Validates sum == 10,000 bps before saving. Stashes the prior split for one-step rollback.- show