storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package storage provides generic interfaces for pluggable storage engines and associated abstract storage implementation logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	NewMetricRecord(ctx context.Context, name, query string) (MetricRecord, error)
	CleanupRecords(ctx context.Context, keep []string) error
	Close() error
}

Manager interface implemented by associated storage manager, e.g. Datastore, BoltDB, etc.

type MetricRecord

type MetricRecord interface {
	UpdateError(ctx context.Context, e error) error
	UpdateSuccess(ctx context.Context, points int, msg string) error
	GetLastUpdate() time.Time
	GetCounterStartTime() time.Time
	SetCounterStartTime(ctx context.Context, start time.Time) error
}

MetricRecord is an interface implemented by StoredMetricRecord.

Jump to

Keyboard shortcuts

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