mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Set up frontend linting for Azure - Fix final frontend import - Fix other lint issues * Add Azure Monitor to backend linting * Remove featuremgmt dependency * Add intervalv2 to list of disallowed imports * Remove config dependency - Replace with function from azure-sdk * Remove util dependency * Duplicate interval functionality from core * Add required backend wrappers * Update frontend * Add testing helper * Add missing package * Bump minimum grafana dependency * Fix dependency * Regen cue * Fix lint * Update expected response file * Update import and dependency
24 lines
961 B
Go
24 lines
961 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/grafana/grafana-plugin-sdk-go/backend/datasource"
|
|
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
|
|
)
|
|
|
|
func main() {
|
|
// Start listening to requests sent from Grafana. This call is blocking so
|
|
// it won't finish until Grafana shuts down the process or the plugin choose
|
|
// to exit by itself using os.Exit. Manage automatically manages life cycle
|
|
// of datasource instances. It accepts datasource instance factory as first
|
|
// argument. This factory will be automatically called on incoming request
|
|
// from Grafana to create different instances of SampleDatasource (per datasource
|
|
// ID). When datasource configuration changed Dispose method will be called and
|
|
// new datasource instance created using NewSampleDatasource factory.
|
|
if err := datasource.Manage("grafana-azure-monitor-datasource", NewDatasource, datasource.ManageOpts{}); err != nil {
|
|
log.DefaultLogger.Error(err.Error())
|
|
os.Exit(1)
|
|
}
|
|
}
|