#import "modules/std.sx";

// How a channel rolls a release out: `manual` is all-or-nothing once
// published; `percentage` stages exposure by `rollout_percent` (0..100).
RolloutPolicy :: enum u8 {
    manual;
    percentage;
}

// A named publishing track for an app (e.g. "stable", "beta"), pointing at
// the release currently serving traffic. `rollout_percent` is meaningful
// only under the `percentage` policy.
Channel :: struct {
    app_id: string;
    name: string;
    current_release_id: string;
    policy: RolloutPolicy = .manual;
    rollout_percent: i64 = 100;
}
