github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/clients/pkg/promtail/targets/windows/targetmanager.go (about) 1 //go:build !windows 2 // +build !windows 3 4 package windows 5 6 import ( 7 "github.com/go-kit/log" 8 "github.com/go-kit/log/level" 9 "github.com/prometheus/client_golang/prometheus" 10 11 "github.com/grafana/loki/clients/pkg/promtail/api" 12 "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" 13 "github.com/grafana/loki/clients/pkg/promtail/targets/target" 14 ) 15 16 // TargetManager manages a series of windows event targets. 17 type TargetManager struct{} 18 19 // NewTargetManager creates a new Windows managers. 20 func NewTargetManager( 21 reg prometheus.Registerer, 22 logger log.Logger, 23 client api.EntryHandler, 24 scrapeConfigs []scrapeconfig.Config, 25 ) (*TargetManager, error) { 26 level.Warn(logger).Log("msg", "WARNING!!! Windows target was configured but support for reading the windows event is not compiled into this build of promtail!") 27 return &TargetManager{}, nil 28 } 29 30 // Ready returns true if at least one Windows target is also ready. 31 func (tm *TargetManager) Ready() bool { return false } 32 33 // Stop stops the Windows target manager and all of its targets. 34 func (tm *TargetManager) Stop() {} 35 36 // ActiveTargets returns the list of active Windows targets. 37 func (tm *TargetManager) ActiveTargets() map[string][]target.Target { return nil } 38 39 // AllTargets returns the list of all targets. 40 func (tm *TargetManager) AllTargets() map[string][]target.Target { return nil }