pub struct NamespaceControllerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl NamespaceControllerSynchronousProxy
impl NamespaceControllerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<NamespaceControllerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<NamespaceControllerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn detach(&self, ___deadline: MonotonicInstant) -> Result<[u8; 16], Error>
pub fn detach(&self, ___deadline: MonotonicInstant) -> Result<[u8; 16], Error>
Detaches the client end from the controller’s lifetime.
After calling Detach
, closing this client end no longer causes the
filtering state owned by the controller to be removed. The key returned
by the method can be used once by a client to reconnect to a detached
controller. This allows clients to ensure the filtering state they
install is resilient to client-side crashes and disconnections. (Note,
however, that closing the client end of the channel will flush any
pending changes that have been pushed but not yet committed.)
Detach
can be called multiple times; the key returned by the most
recent call is valid to reconnect to the controller. Calling Detach
will always return a new key and invalidate any previous keys.
Note that, once a client has called Detach
on a controller, the
controller remains detached even after a reconnection. This means that,
for example, if a client detached, closed the client end, reconnected,
and then closed the client end again, the filtering state owned by the
controller would not be removed. After reconnection, the only reason a
client would call Detach
is to be able to reconnect again in the
future, given the key is invalidated after use.
Sourcepub fn push_changes(
&self,
changes: &[Change],
___deadline: MonotonicInstant,
) -> Result<ChangeValidationResult, Error>
pub fn push_changes( &self, changes: &[Change], ___deadline: MonotonicInstant, ) -> Result<ChangeValidationResult, Error>
Append a set of changes to a pending transactional update to the filtering configuration.
To apply these changes, a client must call Commit
.
Sourcepub fn commit(
&self,
payload: CommitOptions,
___deadline: MonotonicInstant,
) -> Result<CommitResult, Error>
pub fn commit( &self, payload: CommitOptions, ___deadline: MonotonicInstant, ) -> Result<CommitResult, Error>
Apply all pending changes. The set of changes will either be applied in its entirety or, in case of an error, not applied at all.
Trait Implementations§
Source§impl SynchronousProxy for NamespaceControllerSynchronousProxy
impl SynchronousProxy for NamespaceControllerSynchronousProxy
Source§type Proxy = NamespaceControllerProxy
type Proxy = NamespaceControllerProxy
Source§type Protocol = NamespaceControllerMarker
type Protocol = NamespaceControllerMarker
Proxy
controls.