telemetry

package
v0.0.0-...-ccf8ba2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package telemetry implements the Telemetry gRPC service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Service) error

Option is a functional option for tests.

type Service

type Service struct {
	pb.UnimplementedTelemetryServiceServer
	// contains filtered or unexported fields
}

Service is the implementation of the telemetry service.

func New

func New(opts ...Option) (*Service, error)

New returns a new instance of the telemetry service.

func (*Service) Collect

func (s *Service) Collect(ctx context.Context, _ *emptypb.Empty) (*pb.CollectResponse, error)

Collect gathers system metrics and returns them without sending them to the metrics sever.

func (*Service) CollectAndSend

func (s *Service) CollectAndSend(ctx context.Context, _ *emptypb.Empty) (*pb.SendResponse, error)

CollectAndSend gathers system metrics and sends them to the metrics sever.

func (*Service) SendDecline

func (s *Service) SendDecline(ctx context.Context, _ *emptypb.Empty) (*pb.SendResponse, error)

SendDecline sends a declined response to the server.

Jump to

Keyboard shortcuts

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