Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSourceHandler ¶
type DataSourceHandler interface {
Query(ctx context.Context, tr TimeRange, ds DataSourceInfo, queries []Query) ([]QueryResult, error)
}
DataSourceHandler handles data source queries.
type DataSourceInfo ¶
type DataSourceInfo struct { ID int64 OrgID int64 Name string Type string URL string JSONData json.RawMessage }
DataSourceInfo holds metadata for the queried data source.
type Query ¶
type Query struct { RefID string MaxDataPoints int64 Interval time.Duration ModelJSON json.RawMessage }
Query represents the query as sent from the frontend.
type QueryResult ¶
QueryResult holds the results for a given query.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves all registered data source handlers.
func (*Server) HandleDataSource ¶
func (g *Server) HandleDataSource(pluginID string, p DataSourceHandler)
HandleDataSource registers a new data source.
The plugin ID should be in the format <org>-<name>-datasource.
Click to show internal directories.
Click to hide internal directories.