Documentation ¶
Index ¶
- Variables
- func GetCESClient(c *CloudEyeSettings) *ces.CesClient
- func LoadDimensions(region, namespace string) []string
- func LoadMetrics(namespace, dimStr string) []string
- func NewCloudEye() datasource.ServeOpts
- type CESClient
- func (c *CESClient) BatchQuery(refIDs []string, req *model.BatchListMetricDataRequest) (*backend.QueryDataResponse, error)
- func (c *CESClient) Check() error
- func (c *CESClient) ListDims(namespace string) []string
- func (c *CESClient) ListMeta(param *QueryParam) []string
- func (c *CESClient) ListMetrics(namespace, dimStr string) []string
- func (c *CESClient) ListNamespaces() []string
- type CachedMeta
- type CloudEyeDatasource
- type CloudEyeSettings
- type CustomBatchListMetricDataRequestBody
- type DataQueryParam
- type DimensionCache
- type MetaCache
- type MetaConf
- type MetaUtil
- type MetricCache
- type NamespaceCache
- type QueryParam
Constants ¶
This section is empty.
Variables ¶
View Source
var DmCache = DimensionCache{MetaCache{ Data: sync.Map{}, }}
View Source
var GetMeta = initMetaConf()
View Source
var MCache = MetricCache{MetaCache{ Data: sync.Map{}, }}
View Source
var NsCache = NamespaceCache{MetaCache{ Data: sync.Map{}, }}
Functions ¶
func GetCESClient ¶
func GetCESClient(c *CloudEyeSettings) *ces.CesClient
func LoadDimensions ¶
func LoadMetrics ¶
func NewCloudEye ¶
func NewCloudEye() datasource.ServeOpts
NewCloudEye returns datasource.ServeOpts.
Types ¶
type CESClient ¶
func (*CESClient) BatchQuery ¶
func (c *CESClient) BatchQuery(refIDs []string, req *model.BatchListMetricDataRequest) (*backend.QueryDataResponse, error)
func (*CESClient) ListMeta ¶
func (c *CESClient) ListMeta(param *QueryParam) []string
func (*CESClient) ListMetrics ¶
func (*CESClient) ListNamespaces ¶
type CachedMeta ¶
type CloudEyeDatasource ¶
type CloudEyeDatasource struct {
// contains filtered or unexported fields
}
func (*CloudEyeDatasource) CheckHealth ¶
func (ds *CloudEyeDatasource) CheckHealth(ctx context.Context, req *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 (*CloudEyeDatasource) QueryData ¶
func (ds *CloudEyeDatasource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
type CloudEyeSettings ¶
type CloudEyeSettings struct { ProjectID string `json:"projectId"` CESEndpoint string `json:"cesEndpoint"` Region string `json:"region"` MetaConfEnabled bool `json:"metaConfEnabled"` AK string `json:"accessKey"` SK string `json:"secretKey"` }
func LoadSettings ¶
func LoadSettings(ctx backend.PluginContext) (*CloudEyeSettings, error)
type CustomBatchListMetricDataRequestBody ¶
type CustomBatchListMetricDataRequestBody struct { model.BatchListMetricDataRequestBody RefIDs []string `json:"refIDs"` Region string `json:"region"` }
type DataQueryParam ¶
type DimensionCache ¶
type DimensionCache struct {
MetaCache
}
type MetaConf ¶
type MetaConf struct { Regions []string `yaml:"regions"` Namespaces map[string][]string `yaml:"namespaces"` // key: region, value: namespaceList Dimensions map[string]map[string][]string `yaml:"dimensions"` // key: region|namespace, value: map[dimKey]dimValues Metrics map[string][]string `yaml:"metrics"` // key: namespace|dimKey, value: metrics }
type MetricCache ¶
type MetricCache struct {
MetaCache
}
type NamespaceCache ¶
type NamespaceCache struct {
MetaCache
}
type QueryParam ¶
Click to show internal directories.
Click to hide internal directories.