Maint: cli package interface rework

- return concrete struct type
- split interface is sub-interfaces
This commit is contained in:
Quentin McGaw (desktop)
2021-07-23 18:52:38 +00:00
parent 0b985e8c35
commit d9ca0deb08
6 changed files with 30 additions and 19 deletions

View File

@@ -12,7 +12,11 @@ import (
"github.com/qdm12/golibs/params"
)
func (c *cli) HealthCheck(ctx context.Context, env params.Env,
type HealthChecker interface {
HealthCheck(ctx context.Context, env params.Env, logger logging.Logger) error
}
func (c *CLI) HealthCheck(ctx context.Context, env params.Env,
logger logging.Logger) error {
// Extract the health server port from the configuration.
config := configuration.Health{}