server

package
v0.0.0-...-4fa06d4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Implementation

type Implementation struct {
	v1.UnimplementedSystemStatsServer
	// contains filtered or unexported fields
}

func NewImplementation

func NewImplementation(storage Storage) *Implementation

NewImplementation returns a new instance of the API Implementation.

func (*Implementation) GetStats

GetStats returns the statistics of the system.

type Storage

type Storage interface {
	// Get returns the metrics of the system from the storage
	Get(ctx context.Context) (models.Metrics, error)
	// Set stores the metrics of the system
	Set(ctx context.Context, m models.Metrics) error
}

Storage defines the interface for storing the metrics of the system.

Jump to

Keyboard shortcuts

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