metrics

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package metrics implements the metrics.core microservice.

The Metrics service is a core microservice that aggregates metrics from other microservices and makes them available for collection.

Index

Constants

View Source
const Hostname = "metrics.core"

Hostname is the default hostname of the microservice: metrics.core.

View Source
const SourceCodeSHA256 = "0a35108b76b7af3b5af1160dccb3797a6e6e4d5370f0b00b421c85894e449658"
View Source
const Timestamp = "2024-07-14T02:54:32.499206Z"
View Source
const Version = 140

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock = intermediate.Mock

Mock is a mockable version of the metrics.core microservice, allowing functions, event sinks and web handlers to be mocked.

func NewMock

func NewMock() *Mock

New creates a new mockable version of the microservice.

type Service

type Service struct {
	*intermediate.Intermediate // DO NOT REMOVE
}

Service implements the metrics.core microservice.

The Metrics service is a core microservice that aggregates metrics from other microservices and makes them available for collection.

func NewService

func NewService() *Service

NewService creates a new metrics.core microservice.

func (*Service) Collect

func (svc *Service) Collect(w http.ResponseWriter, r *http.Request) (err error)

Collect returns the latest aggregated metrics.

func (*Service) Init

func (svc *Service) Init(initializer func(svc *Service)) *Service

Init enables a single-statement pattern for initializing the microservice.

svc.Init(func(svc Service) {
	svc.SetGreeting("Hello")
})

func (*Service) OnShutdown

func (svc *Service) OnShutdown(ctx context.Context) (err error)

OnShutdown is called when the microservice is shut down.

func (*Service) OnStartup

func (svc *Service) OnStartup(ctx context.Context) (err error)

OnStartup is called when the microservice is started up.

Directories

Path Synopsis
app
Package intermediate serves as the foundation of the metrics.core microservice.
Package intermediate serves as the foundation of the metrics.core microservice.
Package metricsapi implements the public API of the metrics.core microservice, including clients and data structures.
Package metricsapi implements the public API of the metrics.core microservice, including clients and data structures.

Jump to

Keyboard shortcuts

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