Documentation
¶
Overview ¶
Copyright 2021 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChecksReport ¶
type ChecksReport struct {
Endpoints []EndpointReport `json:"endpoints,omitempty"`
Health HealthReport `json:"health,omitempty"`
}
type ConfigReport ¶
type ConfigReport struct {
ReachabilityTimeout string `json:"reachability_timeout,omitempty"`
}
ConfigReport configuration used for status report.
type EndpointReport ¶
type EndpointReport struct {
URL string `json:"url"`
Reachable bool `json:"reachable"`
Error string `json:"error,omitempty"`
}
EndpointReport represents a single backend endpoint reachability status.
type HealthReport ¶ added in v1.67.3
HealthReport represents the backend communication healthiness status.
type Report ¶
type Report struct {
Checks *ChecksReport `json:"checks,omitempty"`
Config *ConfigReport `json:"config,omitempty"`
}
Report agent status report. It contains: - checks:
- backend endpoints reachability statuses
- backend communication healthiness
- configuration fields will be empty when ReportErrors() report no errors.
type ReportEntity ¶
ReportEntity agent entity report.
type Reporter ¶
type Reporter interface {
// Report full status report.
Report() (Report, error)
// ReportErrors only reports errors found.
ReportErrors() (Report, error)
// ReportEntity agent entity report.
ReportEntity() (ReportEntity, error)
// ReportHealth agent healthy report.
ReportHealth() HealthReport
}
Reporter reports agent status.
func NewReporter ¶
func NewReporter( ctx context.Context, l log.Entry, backendEndpoints []string, healthEndpoint string, timeout time.Duration, transport http.RoundTripper, agentIDProvide id.Provide, agentEntityKeyProvider func() string, license, userAgent string, ) Reporter
NewReporter creates a new status reporter.
Click to show internal directories.
Click to hide internal directories.