mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
- 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.
24 lines
461 B
Go
24 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)
|
|
}
|