check server is running before running command

This commit is contained in:
Bruce MacDonald 2023-07-31 16:25:57 -04:00
parent 90ba0b80c7
commit e72fe7945f
2 changed files with 72 additions and 25 deletions

View file

@ -223,3 +223,10 @@ func (c *Client) Delete(ctx context.Context, req *DeleteRequest) error {
}
return nil
}
func (c *Client) Heartbeat(ctx context.Context) error {
if err := c.do(ctx, http.MethodGet, "/", nil, nil); err != nil {
return err
}
return nil
}