status

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 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"`
}

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 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

- configuration fields will be empty when ReportErrors() report no errors.

type ReportEntity

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

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)
}

Reporter reports agent status.

func NewReporter

func NewReporter(
	ctx context.Context,
	l log.Entry,
	backendEndpoints []string,
	timeout time.Duration,
	transport http.RoundTripper,
	agentIDProvide id.Provide,
	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