models

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisSeriesRepository

type RedisSeriesRepository struct {
	RedisPool      *redis.Pool
	RedisKeyPrefix string
}

RedisSeriesRepository type.

func (*RedisSeriesRepository) FindCPU

func (rsr *RedisSeriesRepository) FindCPU(seriesType SeriesType) (Series, error)

FindCPU function.

func (*RedisSeriesRepository) FindDisk

func (rsr *RedisSeriesRepository) FindDisk(seriesType SeriesType, path string) (Series, error)

FindDisk function.

func (*RedisSeriesRepository) FindDiskPaths

func (rsr *RedisSeriesRepository) FindDiskPaths() ([]string, error)

FindDiskPaths function.

func (*RedisSeriesRepository) FindMemory

func (rsr *RedisSeriesRepository) FindMemory(seriesType SeriesType) (Series, error)

FindMemory function.

type Series

type Series []Value

Series type.

type SeriesRepository

type SeriesRepository interface {
	FindCPU(SeriesType) (Series, error)
	FindMemory(SeriesType) (Series, error)
	FindDisk(SeriesType, string) (Series, error)
	FindDiskPaths() ([]string, error)
}

SeriesRepository type.

type SeriesType

type SeriesType string

SeriesType type.

const (
	// Day series.
	Day SeriesType = "day"

	// Week series.
	Week SeriesType = "week"

	// Month series.
	Month SeriesType = "month"
)

type Value

type Value struct {
	X int64   `json:"x"`
	Y float64 `json:"y"`
}

Value type.

Jump to

Keyboard shortcuts

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