feat: setup stream logging
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
8b064c2169
commit
150c7c3c98
@ -61,6 +61,7 @@ impl GrpcClient {
|
||||
) -> anyhow::Result<()> {
|
||||
let mut client = self.client().await?;
|
||||
|
||||
tracing::debug!("creating stream for listening to events on: {}", namespace);
|
||||
let resp = client
|
||||
.listen_events(ListenEventsRequest {
|
||||
namespace: namespace.into(),
|
||||
@ -68,8 +69,10 @@ impl GrpcClient {
|
||||
})
|
||||
.await?;
|
||||
|
||||
tracing::debug!("setup stream: {}", namespace);
|
||||
let mut inner = resp.into_inner();
|
||||
while let Ok(Some(message)) = inner.message().await {
|
||||
tracing::debug!("received message: {}", namespace);
|
||||
exec.execute(message).await?;
|
||||
}
|
||||
|
||||
@ -77,6 +80,7 @@ impl GrpcClient {
|
||||
}
|
||||
|
||||
async fn client(&self) -> anyhow::Result<ChurnClient<tonic::transport::Channel>> {
|
||||
tracing::debug!("setting up client");
|
||||
let channel = if self.host.starts_with("https") {
|
||||
Channel::from_shared(self.host.to_owned())?
|
||||
.tls_config(ClientTlsConfig::new().with_native_roots())?
|
||||
|
Loading…
Reference in New Issue
Block a user