pub struct OverlaydServer { /* private fields */ }Expand description
The overlay daemon engine.
Implementations§
Source§impl OverlaydServer
impl OverlaydServer
Sourcepub fn new(data_dir: PathBuf) -> Self
pub fn new(data_dir: PathBuf) -> Self
Create a fresh server bound to data_dir. The overlay itself is brought
up lazily by SetupGlobalOverlay (which carries the deployment, slice,
port, and NAT toggle from the main daemon).
§Panics
Panics only if the compile-time-constant default CIDR 10.200.0.0/16
fails to parse (impossible).
Sourcepub fn with_uapi_sock_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn with_uapi_sock_dir(self, dir: impl Into<PathBuf>) -> Self
Override the WireGuard UAPI socket directory for every overlay
transport built by this server.
Sourcepub fn shutdown_requested(&self) -> bool
pub fn shutdown_requested(&self) -> bool
Whether a Shutdown request has been received.
Sourcepub fn data_dir(&self) -> &Path
pub fn data_dir(&self) -> &Path
The root data directory this server was constructed with. Used by the
uninstall path (purge_managed_networks) and for HCN marker resolution.
Sourcepub async fn handle(&mut self, req: OverlaydRequest) -> OverlaydResponse
pub async fn handle(&mut self, req: OverlaydRequest) -> OverlaydResponse
Execute one OverlaydRequest, producing the OverlaydResponse the
server sends back over IPC. Any internal error is folded into
OverlaydResponse::Err.
Auto Trait Implementations§
impl !Freeze for OverlaydServer
impl !RefUnwindSafe for OverlaydServer
impl !UnwindSafe for OverlaydServer
impl Send for OverlaydServer
impl Sync for OverlaydServer
impl Unpin for OverlaydServer
impl UnsafeUnpin for OverlaydServer
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
Mutably borrows from an owned value. Read more
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>
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 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>
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