memory

package
v0.0.0-...-165a0e8 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Storage with RAM

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	MetricsType entity.MetricsType
}

func New

func New(config cfg, log log) (*Storage, error)

func (*Storage) GetAllData

func (m *Storage) GetAllData(ctx context.Context) (entity.MetricsType, error)

func (*Storage) GetCounter

func (m *Storage) GetCounter(ctx context.Context, counterName string) (int64, error)

func (*Storage) GetGauge

func (m *Storage) GetGauge(ctx context.Context, gaugeName string) (float64, error)

func (*Storage) Ping

func (m *Storage) Ping(ctx context.Context) error

func (*Storage) SaveAllData

func (m *Storage) SaveAllData(ctx context.Context, metrics []entity.Metrics) error

func (*Storage) SaveCounter

func (m *Storage) SaveCounter(ctx context.Context, counterName string, counterValue int64) error

func (*Storage) SaveGauge

func (m *Storage) SaveGauge(ctx context.Context, gaugeName string, gaugeValue float64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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