func (mux *QueryTypeMux) Handle(queryType string, handler backend.QueryDataHandler) {
	if handler == nil {
		panic("datasource: nil handler")
	}
	if mux.m == nil {
		mux.m = map[string]backend.QueryDataHandler{}
		mux.fallbackHandler = backend.QueryDataHandlerFunc(fallbackHandler)
	}
	if _, exist := mux.m[queryType]; exist {
		panic("datasource: multiple registrations for " + queryType)
	}
	if queryType == "" {
		mux.fallbackHandler = handler
		return
	}
	mux.m[queryType] = handler
}
Handle registers the handler for the given query type.

Providing an empty queryType registers the handler as a fallback handler
that will be called when query type doesn't match any registered handlers.
If handler is nil, Handle panics.
If a handler already exists for queryType, Handle panics.
package datasource
import (
	"context"
	"fmt"
	"github.com/grafana/grafana-plugin-sdk-go/backend"
)
type QueryTypeMux struct {
	m               map[string]backend.QueryDataHandler
	fallbackHandler backend.QueryDataHandler
}
func NewQueryTypeMux() *QueryTypeMux {
	return new(QueryTypeMux)
}