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 ¶
func (i *Implementation) GetStats(ctx context.Context, _ *v1.StatsRequest) (*v1.StatsResponse, error)
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.
Click to show internal directories.
Click to hide internal directories.