chore: refinements

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
This commit is contained in:
Leonardo Cecchi 2024-11-29 14:08:37 +01:00 committed by Francesco Canovai
parent d23bfecb04
commit 7f231770fd

View File

@ -29,7 +29,7 @@ func NewCmd() *cobra.Command {
func unixHealthCheck() *cobra.Command { func unixHealthCheck() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "unix", Use: "unix",
Short: "unix healthcheck", Short: "executes the health check command on unix:///plugins/barman-cloud.cloudnative-pg.io",
RunE: func(cmd *cobra.Command, _ []string) error { RunE: func(cmd *cobra.Command, _ []string) error {
dialPath := fmt.Sprintf("unix://%s", path.Join("/plugins", metadata.PluginName)) dialPath := fmt.Sprintf("unix://%s", path.Join("/plugins", metadata.PluginName))
cli, cliErr := grpc.NewClient(dialPath, grpc.WithTransportCredentials(insecure.NewCredentials())) cli, cliErr := grpc.NewClient(dialPath, grpc.WithTransportCredentials(insecure.NewCredentials()))
@ -54,7 +54,7 @@ func unixHealthCheck() *cobra.Command {
return nil return nil
} }
log.Error(fmt.Errorf("unexpected healthcheck response: %v", res.Status), log.Error(fmt.Errorf("unexpected healthcheck status: %v", res.Status),
"while processing healthcheck response") "while processing healthcheck response")
// exit code 1 is returned when we exit from the function with an error // exit code 1 is returned when we exit from the function with an error