Documentation ¶
Index ¶
- Constants
- type NewRelicClient
- type NewRelicClientAPI
- type Provider
- func (p *Provider) GarbageCollect(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, i int) error
- func (p *Provider) GetMetadata(metric v1alpha1.Metric) map[string]string
- func (p *Provider) Resume(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, ...) v1alpha1.Measurement
- func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alpha1.Measurement
- func (p *Provider) Terminate(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, ...) v1alpha1.Measurement
- func (p *Provider) Type() string
Constants ¶
const ( //ProviderType indicates the provider is wavefront ProviderType = "NewRelic" DefaultNewRelicProfileSecretName = "newrelic" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewRelicClient ¶
func (*NewRelicClient) Query ¶
func (n *NewRelicClient) Query(query string) ([]nrdb.NRDBResult, error)
Query executes a NRQL query against the given New Relic account
type NewRelicClientAPI ¶
type NewRelicClientAPI interface {
Query(query string) ([]nrdb.NRDBResult, error)
}
func NewNewRelicAPIClient ¶
func NewNewRelicAPIClient(metric v1alpha1.Metric, kubeclientset kubernetes.Interface) (NewRelicClientAPI, error)
NewNewRelicAPIClient creates a new NewRelic API client from metric configuration
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewNewRelicProvider ¶
func NewNewRelicProvider(api NewRelicClientAPI, logCtx log.Entry) *Provider
NewNewRelicProvider creates a new NewRelic provider
func (*Provider) GarbageCollect ¶
GarbageCollect should not be used the NewRelic provider since all the work should occur in the Run method
func (*Provider) GetMetadata ¶ added in v1.2.0
GetMetadata returns any additional metadata which needs to be stored & displayed as part of the metrics result.
func (*Provider) Resume ¶
func (p *Provider) Resume(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, measurement v1alpha1.Measurement) v1alpha1.Measurement
Resume should not be used the NewRelic provider since all the work should occur in the Run method
func (*Provider) Run ¶
func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alpha1.Measurement
Run queries NewRelic for the metric
func (*Provider) Terminate ¶
func (p *Provider) Terminate(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, measurement v1alpha1.Measurement) v1alpha1.Measurement
Terminate should not be used the NewRelic provider since all the work should occur in the Run method