Skip to main content

nominal_api_conjure/conjure/objects/persistent/compute/api/
shutdown_notice.rs

1/// Indicates that the websocket will shut down in the near future. Until it is, SubscriptionUpdates will
2/// still be sent to the client. Clients that want to avoid downtime or latency spikes should initiate a new
3/// websocket and recreate all their subscriptions there but still keep this websocket open until the new
4/// websockets starts sending SubscriptionUpdates.
5/// Note: The initial updates that the new websocket sends might be somewhat stale because of server and
6/// connection pools warm up. The client might want to wait with fully switching to the new subscription until
7/// the updates aren't very stale anymore.
8#[derive(
9    Debug,
10    Clone,
11    conjure_object::serde::Serialize,
12    conjure_object::serde::Deserialize,
13    PartialEq,
14    Eq,
15    PartialOrd,
16    Ord,
17    Hash,
18    Copy,
19    conjure_object::log_safety::derive::LogSafe
20)]
21#[serde(crate = "conjure_object::serde")]
22#[conjure_object::private::staged_builder::staged_builder]
23#[builder(crate = conjure_object::private::staged_builder, update, inline)]
24pub struct ShutdownNotice {}
25impl ShutdownNotice {
26    /// Constructs a new instance of the type.
27    #[inline]
28    pub fn new() -> Self {
29        Self::builder().build()
30    }
31}