mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-12 05:33:11 +01:00
chore: refinements
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
This commit is contained in:
parent
d23bfecb04
commit
7f231770fd
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user