func (a *worker) GetScanners() []scanner.Scanner {
	return a.scanners
}
GetScanners will return the configured scanners.
package agent
import (
	"sync"
	"time"
	"github.com/golang/glog"
	"github.com/joyrex2001/nightshift/internal/scanner"
	"github.com/joyrex2001/nightshift/internal/trigger"
)
type Agent interface {
	AddScanner(scanner.Scanner)
	AddTrigger(string, trigger.Trigger)
	SetResyncInterval(time.Duration)
	GetObjects() map[string]*scanner.Object
	GetScanners() []scanner.Scanner
	GetTriggers() map[string]trigger.Trigger
	UpdateSchedule()
	Start()
	Stop()
}
type worker struct {
	interval  time.Duration
	m         sync.Mutex
	done      chan bool
	scanners  []scanner.Scanner
	triggers  map[string]trigger.Trigger
	trigqueue chan triggr
	watchers  []watch
	objects   map[string]*objectspq
	now       time.Time
	past      time.Time
}
var instance *worker
var once sync.Once
func New() Agent {
	once.Do(func() {
		instance = &worker{
			objects:   map[string]*objectspq{},
			interval:  15 * time.Minute,
			watchers:  []watch{},
			done:      make(chan bool),
			past:      time.Now().Add(-60 * time.Minute),
			scanners:  []scanner.Scanner{},
			triggers:  map[string]trigger.Trigger{},
			trigqueue: make(chan triggr, 500),
		}
	})
	return instance
}
func (a *worker) SetResyncInterval(interval time.Duration) {
	a.interval = interval
}
func (a *worker) AddScanner(scnr scanner.Scanner) {
	a.m.Lock()
	defer a.m.Unlock()
	a.scanners = append(a.scanners, scnr)
}