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

Method subscribe_custom_msg

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

Source from the content-addressed store, hash-verified

5163 type SubscribeCustomMsgStream = NotificationStream<pb::CustomMsgNotification>;
5164
5165 async fn subscribe_custom_msg(
5166 &self,
5167 _request : tonic::Request<pb::StreamCustomMsgRequest>
5168 ) -> Result<tonic::Response<Self::SubscribeCustomMsgStream>, tonic::Status> {
5169 let receiver = self.events.subscribe();
5170 let stream = BroadcastStream::new(receiver);
5171 let boxed = Box::pin(stream);
5172
5173 let result = NotificationStream {
5174 inner : boxed,
5175 fn_filter_map : |x| {
5176 match x {
5177 Notification::CustomMsg(x) => {
5178 Some(x.into())
5179 }
5180 _ => None
5181 }
5182 }
5183 };
5184 Ok(tonic::Response::new(result))
5185 }
5186
5187
5188 type SubscribeDeprecatedOneshotStream = NotificationStream<pb::DeprecatedOneshotNotification>;

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.45

Tested by

no test coverage detected