nominal_api/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)]
20#[serde(crate = "conjure_object::serde")]
21#[conjure_object::private::staged_builder::staged_builder]
22#[builder(crate = conjure_object::private::staged_builder, update, inline)]
23pub struct ShutdownNotice {}
24impl ShutdownNotice {
25 /// Constructs a new instance of the type.
26 #[inline]
27 pub fn new() -> Self {
28 Self::builder().build()
29 }
30}