storage

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeStorage

type FakeStorage struct{}

FakeStorage represents a fake implementation of storage to be used in tests.

func NewFakeStorage

func NewFakeStorage() FakeStorage

FakeStorage creates a new `FakeStorage`.

func (FakeStorage) IsEmpty

func (f FakeStorage) IsEmpty() bool

func (FakeStorage) WriteMetrics added in v0.2.0

func (f FakeStorage) WriteMetrics(zettelkastenMetrics metrics.Metrics, timestamp time.Time) error

type InfluxDBStorage

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

InfluxDBStorage represents the implementation of a metric storage using InfluxDB.

func NewInfluxDBStorage

func NewInfluxDBStorage(url, org, bucket, token string) InfluxDBStorage

NewInfluxDBStorage creates a new `InfluxDBStorage`.

func (InfluxDBStorage) WriteMetrics added in v0.2.0

func (i InfluxDBStorage) WriteMetrics(zettelkastenMetrics metrics.Metrics, timestamp time.Time) error

WriteMetric writes `metric` for `noteName` to the storage with `timestamp`.

type Storage

type Storage interface {
	// WriteMetric writes the `zettelkastenMetrics` to the storage.
	WriteMetrics(zettelkastenMetrics metrics.Metrics, timestamp time.Time) error
}

Storage represents a storage for metrics.

type VictoriaMetricsStorage added in v0.3.0

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

func NewVictoriaMetricsStorage added in v0.3.0

func NewVictoriaMetricsStorage(url string) VictoriaMetricsStorage

func (VictoriaMetricsStorage) WriteMetrics added in v0.3.0

func (v VictoriaMetricsStorage) WriteMetrics(zettelkastenMetrics metrics.Metrics, timestamp time.Time) error

Jump to

Keyboard shortcuts

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