postgresql

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: 9 Imported by: 0

Documentation

Overview

Storage with postgresql

Index

Constants

View Source
const (
	UniqueViolation = "unique_violation"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func New

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

func (*Storage) GetAllData

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

func (*Storage) GetCounter

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

func (*Storage) GetGauge

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

func (*Storage) Ping

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

func (*Storage) SaveAllData

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

func (*Storage) SaveCounter

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

func (*Storage) SaveGauge

func (s *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