Skip to content

Commit

Permalink
add white space to make the server connection a separate block.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShohamBit committed Nov 28, 2024
1 parent 0db47c2 commit aab269e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/traceectl/cmd/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ func listEvents(cmd *cobra.Command, args []string) {
return
}
defer traceeClient.CloseConnection()

response, err := traceeClient.GetEventDefinitions(context.Background(), &pb.GetEventDefinitionsRequest{EventNames: args})
if err != nil {
cmd.PrintErrln("Error getting event definitions: ", err)
return

}
format, err := formatter.NewFormatter(eventFormatFlag, cmd)
if err != nil {
Expand Down Expand Up @@ -117,6 +117,7 @@ func getEventDescriptions(cmd *cobra.Command, args []string) {
return
}
defer traceeClient.CloseConnection()

response, err := traceeClient.GetEventDefinitions(context.Background(), &pb.GetEventDefinitionsRequest{EventNames: args})
if err != nil {
cmd.PrintErrln("Error getting event definitions: ", err)
Expand Down
2 changes: 2 additions & 0 deletions cmd/traceectl/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func displayMetrics(cmd *cobra.Command, _ []string) {
return
}
defer traceeClient.CloseConnection()

response, err := traceeClient.GetMetrics(context.Background(), &pb.GetMetricsRequest{})
if err != nil {
cmd.PrintErrln("Error getting metrics: ", err)
Expand All @@ -100,6 +101,7 @@ func displayVersion(cmd *cobra.Command, _ []string) {
return
}
defer traceeClient.CloseConnection()

response, err := traceeClient.GetVersion(context.Background(), &pb.GetVersionRequest{})

if err != nil {
Expand Down
1 change: 1 addition & 0 deletions cmd/traceectl/cmd/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func streamEvents(cmd *cobra.Command, args []string) {
return
}
defer traceeClient.CloseConnection()

//request to stream events
req := &pb.StreamEventsRequest{Policies: args}
stream, err := traceeClient.StreamEvents(cmd.Context(), req)
Expand Down

0 comments on commit aab269e

Please sign in to comment.