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

Method subscribe_log

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

Source from the content-addressed store, hash-verified

5313 type SubscribeLogStream = NotificationStream<pb::LogNotification>;
5314
5315 async fn subscribe_log(
5316 &self,
5317 _request : tonic::Request<pb::StreamLogRequest>
5318 ) -> Result<tonic::Response<Self::SubscribeLogStream>, tonic::Status> {
5319 let receiver = self.events.subscribe();
5320 let stream = BroadcastStream::new(receiver);
5321 let boxed = Box::pin(stream);
5322
5323 let result = NotificationStream {
5324 inner : boxed,
5325 fn_filter_map : |x| {
5326 match x {
5327 Notification::Log(x) => {
5328 Some(x.into())
5329 }
5330 _ => None
5331 }
5332 }
5333 };
5334 Ok(tonic::Response::new(result))
5335 }
5336
5337
5338 type SubscribeOnionMessageForwardFailStream = NotificationStream<pb::OnionMessageForwardFailNotification>;

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.45

Tested by

no test coverage detected