Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGatherer ¶
func NewGatherer(cfg ConfigGatherer) (metric.Gatherer, error)
NewGatherer returns a new gatherer that knows how to register different gatherer types based on datasources and when calling the methods of this gatherer will delegate to the correct gatherer based on the query's datasource ID.
Types ¶
type ConfigGatherer ¶
type ConfigGatherer struct { // DashboardDatasources are the datasources that are on the dashboards and // will be reference, these datasources are the ones with the lowest priority. DashboardDatasources []model.Datasource // UserDatasources are the datasources outside the dashboard and defined by the suer // the ones that have priority over dashboards, also are the ones that will be used as // replacement for the aliased datasources. UserDatasources []model.Datasource // Aliases are the aliases of the dashboard datasources. // The key of the map is the referenced ID on the dashboard, and the // value of the map is the ID of the datasource that will be used. Aliases map[string]string // CreateFakeFunc is the function that will be called to create fake gatherers. CreateFakeFunc func(ds model.FakeDatasource) (metric.Gatherer, error) // CreatePrometheusFunc is the function that will be called to create Prometheus gatherers. CreatePrometheusFunc func(ds model.PrometheusDatasource) (metric.Gatherer, error) // CreateGraphiteFunc is the function that will be called to create Graphite gatherers. CreateGraphiteFunc func(ds model.GraphiteDatasource) (metric.Gatherer, error) }
ConfigGatherer is the configuration of the multi Gatherer.
Click to show internal directories.
Click to hide internal directories.