pub struct MacpServer { /* private fields */ }Implementations§
Source§impl MacpServer
impl MacpServer
pub fn new(runtime: Arc<Runtime>, security: SecurityLayer) -> Self
pub fn with_read_only_policies(self) -> Self
Sourcepub fn with_policy_engine(self, engine: Arc<dyn PolicyEngine>) -> Self
pub fn with_policy_engine(self, engine: Arc<dyn PolicyEngine>) -> Self
Install an external ingress policy engine (OPA/Cedar/custom). All session starts, session-scoped sends, and session reads are then additionally gated on it (fail closed).
Trait Implementations§
Source§impl Clone for MacpServer
impl Clone for MacpServer
Source§fn clone(&self) -> MacpServer
fn clone(&self) -> MacpServer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl MacpRuntimeService for MacpServer
impl MacpRuntimeService for MacpServer
Source§type StreamSessionStream = Pin<Box<dyn Stream<Item = Result<StreamSessionResponse, Status>> + Send>>
type StreamSessionStream = Pin<Box<dyn Stream<Item = Result<StreamSessionResponse, Status>> + Send>>
Server streaming response type for the StreamSession method.
Source§type WatchModeRegistryStream = Pin<Box<dyn Stream<Item = Result<WatchModeRegistryResponse, Status>> + Send>>
type WatchModeRegistryStream = Pin<Box<dyn Stream<Item = Result<WatchModeRegistryResponse, Status>> + Send>>
Server streaming response type for the WatchModeRegistry method.
Source§type WatchRootsStream = Pin<Box<dyn Stream<Item = Result<WatchRootsResponse, Status>> + Send>>
type WatchRootsStream = Pin<Box<dyn Stream<Item = Result<WatchRootsResponse, Status>> + Send>>
Server streaming response type for the WatchRoots method.
Source§type WatchSignalsStream = Pin<Box<dyn Stream<Item = Result<WatchSignalsResponse, Status>> + Send>>
type WatchSignalsStream = Pin<Box<dyn Stream<Item = Result<WatchSignalsResponse, Status>> + Send>>
Server streaming response type for the WatchSignals method.
Source§type WatchSessionsStream = Pin<Box<dyn Stream<Item = Result<WatchSessionsResponse, Status>> + Send>>
type WatchSessionsStream = Pin<Box<dyn Stream<Item = Result<WatchSessionsResponse, Status>> + Send>>
Server streaming response type for the WatchSessions method.
Source§type WatchPoliciesStream = Pin<Box<dyn Stream<Item = Result<WatchPoliciesResponse, Status>> + Send>>
type WatchPoliciesStream = Pin<Box<dyn Stream<Item = Result<WatchPoliciesResponse, Status>> + Send>>
Server streaming response type for the WatchPolicies method.
fn initialize<'life0, 'async_trait>(
&'life0 self,
request: Request<InitializeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<InitializeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
request: Request<SendRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SendResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_session<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_session<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CancelSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn suspend_session<'life0, 'async_trait>(
&'life0 self,
request: Request<SuspendSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SuspendSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn suspend_session<'life0, 'async_trait>(
&'life0 self,
request: Request<SuspendSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SuspendSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Session suspension / resume (RFC-MACP-0001 §7.5)
fn resume_session<'life0, 'async_trait>(
&'life0 self,
request: Request<ResumeSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ResumeSessionResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_manifest<'life0, 'async_trait>(
&'life0 self,
request: Request<GetManifestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetManifestResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_modes<'life0, 'async_trait>(
&'life0 self,
_request: Request<ListModesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListModesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_roots<'life0, 'async_trait>(
&'life0 self,
_request: Request<ListRootsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListRootsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_session<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<StreamSessionRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamSessionStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_mode_registry<'life0, 'async_trait>(
&'life0 self,
_request: Request<WatchModeRegistryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchModeRegistryStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_roots<'life0, 'async_trait>(
&'life0 self,
_request: Request<WatchRootsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchRootsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn watch_signals<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchSignalsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchSignalsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_signals<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchSignalsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchSignalsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ambient Signal observation
Source§fn list_sessions<'life0, 'async_trait>(
&'life0 self,
request: Request<ListSessionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListSessionsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
request: Request<ListSessionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListSessionsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Session lifecycle observation (RFC-MACP-0001 §7.3)
fn watch_sessions<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchSessionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchSessionsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_ext_modes<'life0, 'async_trait>(
&'life0 self,
_request: Request<ListExtModesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListExtModesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_ext_modes<'life0, 'async_trait>(
&'life0 self,
_request: Request<ListExtModesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListExtModesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Extension mode lifecycle
fn register_ext_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterExtModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterExtModeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unregister_ext_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<UnregisterExtModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UnregisterExtModeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn promote_mode<'life0, 'async_trait>(
&'life0 self,
request: Request<PromoteModeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PromoteModeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn register_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterPolicyResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterPolicyResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Governance policy lifecycle (RFC-MACP-0012)
fn unregister_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<UnregisterPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UnregisterPolicyResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_policy<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPolicyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetPolicyResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_policies<'life0, 'async_trait>(
&'life0 self,
request: Request<ListPoliciesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListPoliciesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_policies<'life0, 'async_trait>(
&'life0 self,
_request: Request<WatchPoliciesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchPoliciesStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for MacpServer
impl !UnwindSafe for MacpServer
impl Freeze for MacpServer
impl Send for MacpServer
impl Sync for MacpServer
impl Unpin for MacpServer
impl UnsafeUnpin for MacpServer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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