fleet/server/service/service_status.go
Zach Wasserman 417ef2c9b6
Refactor teams service methods (#910)
- Move team-related service methods to `ee/server/service`.
- Instantiate different service on startup based on license key.
- Refactor service errors into separate package.
- Add support for running E2E tests in both Core and Basic tiers.
2021-05-31 17:07:51 -07:00

25 lines
461 B
Go

package service
import (
"context"
"github.com/pkg/errors"
)
func (svc *Service) StatusResultStore(ctx context.Context) error {
return svc.resultStore.HealthCheck()
}
func (svc *Service) StatusLiveQuery(ctx context.Context) error {
cfg, err := svc.AppConfig(ctx)
if err != nil {
return errors.Wrap(err, "retreiving app config")
}
if cfg.LiveQueryDisabled {
return errors.New("disabled by administrator")
}
return svc.StatusResultStore(ctx)
}