mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
417ef2c9b6
- 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.
25 lines
461 B
Go
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)
|
|
}
|