status

package
v1.67.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

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

type HealthReport struct {
	Healthy bool   `json:"healthy"`
	Error   string `json:"error,omitempty"`
}

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

type ReportEntity struct {
	GUID string `json:"guid"`
	Key  string `json:"key"`
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL