Documentation ¶
Index ¶
- func NewParcaDatasource(ctx context.Context, httpClientProvider *httpclient.Provider, ...) (instancemgmt.Instance, error)
- type CustomMeta
- type Node
- type ParcaDatasource
- func (d *ParcaDatasource) CallResource(ctx context.Context, req *backend.CallResourceRequest, ...) error
- func (d *ParcaDatasource) CheckHealth(ctx context.Context, _ *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (d *ParcaDatasource) Dispose()
- func (d *ParcaDatasource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
- type ProfileType
- type Service
- func (s *Service) CallResource(ctx context.Context, req *backend.CallResourceRequest, ...) error
- func (s *Service) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (s *Service) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewParcaDatasource ¶
func NewParcaDatasource(ctx context.Context, httpClientProvider *httpclient.Provider, settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)
NewParcaDatasource creates a new datasource instance.
Types ¶
type CustomMeta ¶
type CustomMeta struct {
ProfileTypeID string
}
type Node ¶
type Node struct { Node *v1alpha1.FlamegraphNode Level int64 }
type ParcaDatasource ¶
type ParcaDatasource struct {
// contains filtered or unexported fields
}
ParcaDatasource is a datasource for querying application performance profiles.
func (*ParcaDatasource) CallResource ¶
func (d *ParcaDatasource) CallResource(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error
func (*ParcaDatasource) CheckHealth ¶
func (d *ParcaDatasource) CheckHealth(ctx context.Context, _ *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
CheckHealth handles health checks sent from Grafana to the plugin. The main use case for these health checks is the test button on the datasource configuration page which allows users to verify that a datasource is working as expected.
func (*ParcaDatasource) Dispose ¶
func (d *ParcaDatasource) Dispose()
Dispose here tells plugin SDK that plugin wants to clean up resources when a new instance created. As soon as datasource settings change detected by SDK old datasource instance will be disposed and a new one will be created using NewSampleDatasource factory function.
func (*ParcaDatasource) QueryData ¶
func (d *ParcaDatasource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
QueryData handles multiple queries and returns multiple responses. req contains the queries []DataQuery (where each query contains RefID as a unique identifier). The QueryDataResponse contains a map of RefID to the response for each query, and each response contains Frames ([]*Frame).
type ProfileType ¶
type ProfileType struct { // Same as *v1alpha1.ProfileType just added the ID Name string `json:"name,omitempty"` SampleType string `json:"sample_type,omitempty"` SampleUnit string `json:"sample_unit,omitempty"` PeriodType string `json:"period_type,omitempty"` PeriodUnit string `json:"period_unit,omitempty"` Delta bool `json:"delta,omitempty"` ID string `json:"ID,omitempty"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func ProvideService ¶
func ProvideService(httpClientProvider *httpclient.Provider) *Service
func (*Service) CallResource ¶
func (s *Service) CallResource(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error
func (*Service) CheckHealth ¶
func (s *Service) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
func (*Service) QueryData ¶
func (s *Service) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)