Skip to content

Commit

Permalink
Merge pull request #15 from castai/small-fixes
Browse files Browse the repository at this point in the history
add debug logging
  • Loading branch information
ValyaB authored Sep 20, 2024
2 parents 451c038 + 50502ad commit 0e2b0d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/proxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (c *Client) getStream(ctx context.Context) (cloudproxyv1alpha.CloudProxyAPI
}

func (c *Client) sendInitialRequest(stream cloudproxyv1alpha.CloudProxyAPI_StreamCloudProxyClient) error {
c.log.Info("Seding initial request to castai")
c.log.Info("Sending initial request to castai")

err := stream.Send(&cloudproxyv1alpha.StreamCloudProxyRequest{
Request: &cloudproxyv1alpha.StreamCloudProxyRequest_InitialRequest{
Expand Down Expand Up @@ -228,6 +228,7 @@ func (c *Client) processConfigurationRequest(in *cloudproxyv1alpha.StreamCloudPr
c.keepAliveTimeout.Store(in.ConfigurationRequest.GetKeepAliveTimeout())
}
}
c.log.Debugf("Updated keep-alive configuration to %v and keep-alive timeout to %v", c.keepAlive.Load(), c.keepAliveTimeout.Load())
}

func (c *Client) processHTTPRequest(req *cloudproxyv1alpha.HTTPRequest) *cloudproxyv1alpha.HTTPResponse {
Expand Down Expand Up @@ -284,7 +285,8 @@ func (c *Client) sendKeepAlive(stream cloudproxyv1alpha.CloudProxyAPI_StreamClou
ClusterId: c.clusterID,
},
Stats: &cloudproxyv1alpha.ClientStats_Stats{
Status: cloudproxyv1alpha.ClientStats_Stats_OK,
Status: cloudproxyv1alpha.ClientStats_Stats_OK,
Timestamp: time.Now().UnixNano(),
},
},
},
Expand Down

0 comments on commit 0e2b0d8

Please sign in to comment.