Plugins: Core plugins register via backend factory provider (#43171)
* refactoring store interface and init flow * fix import * fix linter * refactor resource calling * load with class * re-order args * fix tests * fix linter * remove old creator * add custom config struct * fix some tests * cleanup * fix * tackle plugins * fix linter * refactor and fix test * add connect failure error * add fix for azure, cloud monitoring and test data * restructure * remove unused err * add fake tracer for test * fix grafana ds plugin
This commit is contained in:
@@ -15,13 +15,15 @@ import (
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/resource/httpadapter"
|
||||
)
|
||||
|
||||
func (s *Service) RegisterRoutes(mux *http.ServeMux) {
|
||||
func (s *Service) registerRoutes() *http.ServeMux {
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/", s.testGetHandler)
|
||||
mux.HandleFunc("/scenarios", s.getScenariosHandler)
|
||||
mux.HandleFunc("/stream", s.testStreamHandler)
|
||||
mux.Handle("/test", createJSONHandler(s.logger))
|
||||
mux.Handle("/test/json", createJSONHandler(s.logger))
|
||||
mux.HandleFunc("/boom", s.testPanicHandler)
|
||||
return mux
|
||||
}
|
||||
|
||||
func (s *Service) testGetHandler(rw http.ResponseWriter, req *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user