From 899ecb9ec2d3e9107d7828194a9cbd5f8898612b Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 4 Jun 2020 12:23:18 +0300 Subject: [PATCH] Resource handler description --- pkg/datasource/resource_handler.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/datasource/resource_handler.go b/pkg/datasource/resource_handler.go index 3f35536..3cb20dc 100644 --- a/pkg/datasource/resource_handler.go +++ b/pkg/datasource/resource_handler.go @@ -8,6 +8,10 @@ import ( "github.com/grafana/grafana-plugin-sdk-go/backend/resource/httpadapter" ) +// Resource handler describes handlers for the resources populated by plugin in plugin.go, like: +// mux.HandleFunc("/", ds.RootHandler) +// mux.HandleFunc("/zabbix-api", ds.ZabbixAPIHandler) + func (ds *ZabbixDatasource) RootHandler(rw http.ResponseWriter, req *http.Request) { ds.logger.Debug("Received resource call", "url", req.URL.String(), "method", req.Method)