MCPcopy Create free account
hub / github.com/ElementsProject/lightning / subscribe_warning

Method subscribe_warning

cln-grpc/src/server.rs:5515–5535  ·  view source on GitHub ↗
(
        &self,
        _request : tonic::Request<pb::StreamWarningRequest>
    )

Source from the content-addressed store, hash-verified

5513 type SubscribeWarningStream = NotificationStream<pb::WarningNotification>;
5514
5515 async fn subscribe_warning(
5516 &self,
5517 _request : tonic::Request<pb::StreamWarningRequest>
5518 ) -> Result<tonic::Response<Self::SubscribeWarningStream>, tonic::Status> {
5519 let receiver = self.events.subscribe();
5520 let stream = BroadcastStream::new(receiver);
5521 let boxed = Box::pin(stream);
5522
5523 let result = NotificationStream {
5524 inner : boxed,
5525 fn_filter_map : |x| {
5526 match x {
5527 Notification::Warning(x) => {
5528 Some(x.into())
5529 }
5530 _ => None
5531 }
5532 }
5533 };
5534 Ok(tonic::Response::new(result))
5535 }
5536
5537
5538 type SubscribePayPartEndStream = NotificationStream<pb::PayPartEndNotification>;

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.45

Tested by

no test coverage detected