Skip to content

Commit

Permalink
msggen: add listconfigs method
Browse files Browse the repository at this point in the history
Changelog-None
  • Loading branch information
daywalker90 authored and cdecker committed May 16, 2024
1 parent 03b75f7 commit 07b8e28
Show file tree
Hide file tree
Showing 11 changed files with 5,064 additions and 101 deletions.
1,612 changes: 1,612 additions & 0 deletions .msggen.json

Large diffs are not rendered by default.

531 changes: 531 additions & 0 deletions cln-grpc/proto/node.proto

Large diffs are not rendered by default.

997 changes: 997 additions & 0 deletions cln-grpc/src/convert.rs

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions cln-grpc/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3090,6 +3090,38 @@ impl Node for Server

}

async fn list_configs(
&self,
request: tonic::Request<pb::ListconfigsRequest>,
) -> Result<tonic::Response<pb::ListconfigsResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::ListconfigsRequest = req.into();
debug!("Client asked for list_configs");
trace!("list_configs request: {:?}", req);
let mut rpc = ClnRpc::new(&self.rpc_path)
.await
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
let result = rpc.call(Request::ListConfigs(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method ListConfigs: {:?}", e)))?;
match result {
Response::ListConfigs(r) => {
trace!("list_configs response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call ListConfigs",
r
)
)),
}

}

async fn stop(
&self,
request: tonic::Request<pb::StopRequest>,
Expand Down
Loading

0 comments on commit 07b8e28

Please sign in to comment.