pub enum OpsAction {
UpgradeTo {
version: String,
},
UpgradeOutcome {
version: String,
outcome: UpgradeOutcomeKind,
},
Unknown,
}Expand description
A control-plane action an operator is asked to authorize.
Lifted to an edge-renderable Rust enum so surfaces match on it without touching the wire crate. Action-agnostic; the upgrade case is the first variant.
Variants§
UpgradeTo
Roll the cluster to a specific release.
UpgradeOutcome
The closed-loop follow-up after an approved UpgradeTo: the executor
launched the roll, then the control plane re-observed cluster state
within a bounded window. A plain, no-decision DM reporting an outcome
that already happened.
Fields
outcome: UpgradeOutcomeKindWhat the closed-loop observation confirmed.
Unknown
An action whose variant this client does not recognise (a newer wire shape). Rendered generically so an edge never silently drops a real ask.
Implementations§
Source§impl OpsAction
impl OpsAction
Sourcepub fn summary(&self) -> String
pub fn summary(&self) -> String
Plain description of the action for an approval prompt — the single wording both edges render, so an added action variant is described once and never diverges between surfaces.
An UpgradeTo ask is worded through the shared
update_copy helper — the same
one the CLI status line and the dashboard banner use — so a person reads
the identical “update ready” copy wherever it surfaces. Rolling the cluster
to a new release replaces the running image, so the change is
Compatibility::Warm: it
restarts the service, and conversations already underway finish first.
Sourcepub fn approve_verb(&self) -> Option<&'static str>
pub fn approve_verb(&self) -> Option<&'static str>
The exact verb an edge puts on the approve affordance for this action, or
None to fall back to a generic “Approve”.
An UpgradeTo ask that can be applied in place carries the shared
APPLY_NOW verb, routed through
the same helper as Self::summary so the button never words the update
differently from its detail. A cold or incompatible change would carry no
verb here; a cluster roll is always warm, so the upgrade ask carries the
apply verb.
Sourcepub const fn is_decision(&self) -> bool
pub const fn is_decision(&self) -> bool
Whether this action carries an Approve/Deny decision at all.
An OpsAction::UpgradeOutcome reports something that already happened,
not an ask.
Every other known action (and Unknown, defensively — a future wire
shape this client doesn’t recognize yet still gets rendered as a
decidable ask rather than silently dropped) is decidable.
Trait Implementations§
impl Eq for OpsAction
impl StructuralPartialEq for OpsAction
Auto Trait Implementations§
impl Freeze for OpsAction
impl RefUnwindSafe for OpsAction
impl Send for OpsAction
impl Sync for OpsAction
impl Unpin for OpsAction
impl UnsafeUnpin for OpsAction
impl UnwindSafe for OpsAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request