mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
This PR is the beginning of distributed query work. For now we are focusing on using the distributed query subsystem to retrieve the basic configuration information (currently just platform), and run the label queries. A mockable clock interface is also added to the service struct, allowing us to inject a clock as a dependency, and write unit tests that can control the time.
16 lines
491 B
Go
16 lines
491 B
Go
package server
|
|
|
|
import (
|
|
"github.com/WatchBeam/clock"
|
|
kitlog "github.com/go-kit/kit/log"
|
|
"github.com/kolide/kolide-ose/config"
|
|
"github.com/kolide/kolide-ose/kolide"
|
|
)
|
|
|
|
func newTestService(ds kolide.Datastore) (kolide.Service, error) {
|
|
return NewService(ds, kitlog.NewNopLogger(), config.TestConfig(), nil, clock.C)
|
|
}
|
|
|
|
func newTestServiceWithClock(ds kolide.Datastore, c clock.Clock) (kolide.Service, error) {
|
|
return NewService(ds, kitlog.NewNopLogger(), config.TestConfig(), nil, c)
|
|
}
|