pub struct UdsAgentServerV2 { /* private fields */ }Expand description
v2 agent server over Unix Domain Socket.
Listens on a Unix socket, accepts connections, and dispatches events to an
AgentHandlerV2 implementation using the v2 binary wire format.
Implementations§
Source§impl UdsAgentServerV2
impl UdsAgentServerV2
Sourcepub fn new(
id: impl Into<String>,
socket_path: impl Into<PathBuf>,
handler: Box<dyn AgentHandlerV2>,
) -> Self
pub fn new( id: impl Into<String>, socket_path: impl Into<PathBuf>, handler: Box<dyn AgentHandlerV2>, ) -> Self
Create a new UDS v2 agent server.
Sourcepub async fn run(&self) -> Result<(), AgentProtocolError>
pub async fn run(&self) -> Result<(), AgentProtocolError>
Start the server.
Removes any stale socket file, binds, and enters an accept loop that spawns a task per connection.
Auto Trait Implementations§
impl Freeze for UdsAgentServerV2
impl !RefUnwindSafe for UdsAgentServerV2
impl Send for UdsAgentServerV2
impl Sync for UdsAgentServerV2
impl Unpin for UdsAgentServerV2
impl UnsafeUnpin for UdsAgentServerV2
impl !UnwindSafe for UdsAgentServerV2
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request