Documentation ¶
Index ¶
- func ResponseTableToFrame(table *types.AzureResponseTable, refID string, executedQuery string) (*data.Frame, error)
- type AzureLogAnalyticsAPIError
- type AzureLogAnalyticsAPIErrorBase
- type AzureLogAnalyticsDatasource
- type AzureLogAnalyticsInnerError
- type AzureLogAnalyticsQuery
- type AzureLogAnalyticsResponse
- type LogAnalyticsMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResponseTableToFrame ¶
func ResponseTableToFrame(table *types.AzureResponseTable, refID string, executedQuery string) (*data.Frame, error)
ResponseTableToFrame converts an AzureResponseTable to a data.Frame.
Types ¶
type AzureLogAnalyticsAPIError ¶
type AzureLogAnalyticsAPIError struct { Details *[]AzureLogAnalyticsAPIErrorBase `json:"details,omitempty"` Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` }
Error definition has been inferred from real data and other model definitions like https://github.com/Azure/azure-sdk-for-go/blob/3640559afddbad452d265b54fb1c20b30be0b062/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/models.go
type AzureLogAnalyticsAPIErrorBase ¶
type AzureLogAnalyticsAPIErrorBase struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` Innererror *AzureLogAnalyticsInnerError `json:"innererror,omitempty"` }
type AzureLogAnalyticsDatasource ¶
type AzureLogAnalyticsDatasource struct {
Proxy types.ServiceProxy
}
AzureLogAnalyticsDatasource calls the Azure Log Analytics API's
func (*AzureLogAnalyticsDatasource) ExecuteTimeSeriesQuery ¶
func (e *AzureLogAnalyticsDatasource) ExecuteTimeSeriesQuery(ctx context.Context, originalQueries []backend.DataQuery, dsInfo types.DatasourceInfo, client *http.Client, url string, tracer tracing.Tracer) (*backend.QueryDataResponse, error)
executeTimeSeriesQuery does the following: 1. build the AzureMonitor url and querystring for each query 2. executes each query by calling the Azure Monitor API 3. parses the responses for each query into data frames
func (*AzureLogAnalyticsDatasource) ResourceRequest ¶
func (e *AzureLogAnalyticsDatasource) ResourceRequest(rw http.ResponseWriter, req *http.Request, cli *http.Client)
type AzureLogAnalyticsQuery ¶
type AzureLogAnalyticsQuery struct { RefID string ResultFormat string URL string JSON json.RawMessage Params url.Values Target string TimeRange backend.TimeRange }
AzureLogAnalyticsQuery is the query request that is built from the saved values for from the UI
type AzureLogAnalyticsResponse ¶
type AzureLogAnalyticsResponse struct { Tables []types.AzureResponseTable `json:"tables"` Error *AzureLogAnalyticsAPIError `json:"error,omitempty"` }
AzureLogAnalyticsResponse is the json response object from the Azure Log Analytics API.
func (*AzureLogAnalyticsResponse) GetPrimaryResultTable ¶
func (ar *AzureLogAnalyticsResponse) GetPrimaryResultTable() (*types.AzureResponseTable, error)
GetPrimaryResultTable returns the first table in the response named "PrimaryResult", or an error if there is no table by that name.
type LogAnalyticsMeta ¶
type LogAnalyticsMeta struct { ColumnTypes []string `json:"azureColumnTypes"` Subscription string `json:"subscription"` Workspace string `json:"workspace"` EncodedQuery []byte `json:"encodedQuery"` // EncodedQuery is used for deep links. }
LogAnalyticsMeta is a type for the a Frame's Meta's Custom property.