Skip to main content

UpdateServerHandle

Struct UpdateServerHandle 

Source
pub struct UpdateServerHandle { /* private fields */ }
Expand description

Running handle to a live Hyperlane HTTP + SSE update server with clean programmatic shutdown.

Implementations§

Source§

impl UpdateServerHandle

Lifecycle control methods on UpdateServerHandle.

Source

pub fn address(&self) -> SocketAddr

Returns the bound SocketAddr of the running Hyperlane update server.

§Returns
  • SocketAddr - Bound address.
Source

pub fn url(&self) -> String

Returns the base HTTP URL (http://host:port) of this server.

§Returns
  • String - Base HTTP URL.
Source

pub fn store(&self) -> &UpdateStore

Returns a reference to the backing UpdateStore.

§Returns
  • &UpdateStore - Update store reference.
Source

pub fn is_running(&self) -> bool

Returns whether this server handle is currently active.

§Returns
  • bool - true while active.
Source

pub fn report(&self, once: bool) -> UpdateServerReport

Builds a machine-readable UpdateServerReport describing the active server endpoints.

§Arguments
  • bool - Whether --once smoke mode was requested.
§Returns
  • UpdateServerReport - Structured server report.
Source

pub fn shutdown(&mut self)

Gracefully shuts down the Hyperlane server, pointer watcher, and Tokio runtime.

Trait Implementations§

Source§

impl Drop for UpdateServerHandle

Available on crate feature update-server only.

Automatic server cleanup when UpdateServerHandle is dropped.

Source§

fn drop(&mut self)

Stops the Hyperlane listener and reclaims resources cleanly.

Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl !Freeze for UpdateServerHandle

§

impl !RefUnwindSafe for UpdateServerHandle

§

impl !UnwindSafe for UpdateServerHandle

§

impl Forget for UpdateServerHandle

§

impl Move for UpdateServerHandle

§

impl Send for UpdateServerHandle
where Arc<UpdateServerState>: Send, Arc<dyn FutureFn<(), Output = Pin<Box<dyn Future<Output = ()> + Send>>>>: Send, AtomicCell<Core>: Send, AtomicUsize: Send, Mutex<LinkedList<Waiter>>: Send, Mutex<RawMutex, LinkedList<Waiter>>: Send, Arc<Handle>: Send, Arc<Handle>: Send, Arc<Inner>: Send, Arc<Inner<()>>: Send,

§

impl Sync for UpdateServerHandle
where Arc<UpdateServerState>: Sync, Arc<dyn FutureFn<(), Output = Pin<Box<dyn Future<Output = ()> + Send>>>>: Sync, AtomicCell<Core>: Sync, AtomicUsize: Sync, Mutex<LinkedList<Waiter>>: Sync, Mutex<RawMutex, LinkedList<Waiter>>: Sync, Arc<Handle>: Sync, Arc<Handle>: Sync, Arc<Inner>: Sync, Arc<Inner<()>>: Sync,

§

impl Unpin for UpdateServerHandle
where Arc<UpdateServerState>: Unpin, Arc<dyn FutureFn<(), Output = Pin<Box<dyn Future<Output = ()> + Send>>>>: Unpin, Align8<*mut Core>: Unpin, Align8<usize>: Unpin, Align4<u32>: Unpin, Align1<u8>: Unpin, *const Waiter is !null: Unpin, Arc<Handle>: Unpin, Arc<Handle>: Unpin, Arc<Inner>: Unpin, Arc<Inner<()>>: Unpin,

§

impl UnsafeUnpin for UpdateServerHandle
where *const ArcInner<UpdateServerState> is !null: UnsafeUnpin, PhantomData<ArcInner<UpdateServerState>>: UnsafeUnpin, *const ArcInner<dyn FutureFn<(), Output = Pin<Box<dyn Future<Output = ()> + Send>>>> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn FutureFn<(), Output = Pin<Box<dyn Future<Output = ()> + Send>>>>>: UnsafeUnpin, Align8<*mut Core>: UnsafeUnpin, Align8<usize>: UnsafeUnpin, PhantomData<Mutex<LinkedList<Waiter>>>: UnsafeUnpin, Align1<u8>: UnsafeUnpin, *const Waiter is !null: UnsafeUnpin, *const ArcInner<Handle> is !null: UnsafeUnpin, PhantomData<ArcInner<Handle>>: UnsafeUnpin, *const ArcInner<Handle> is !null: UnsafeUnpin, PhantomData<ArcInner<Handle>>: UnsafeUnpin, *const ArcInner<Inner> is !null: UnsafeUnpin, PhantomData<ArcInner<Inner>>: UnsafeUnpin, *const ArcInner<Inner<()>> is !null: UnsafeUnpin, PhantomData<ArcInner<Inner<()>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnySend for T
where T: Any + Send,

Source§

impl<T> AnySendSync for T
where T: Any + Send + Sync,

Source§

impl<T> AnySync for T
where T: Any + Sync,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more