Documentation ¶
Index ¶
- Variables
- type Alarm
- type AlarmRepository
- type Probe
- type ProbeRepository
- type RedisAlarmRepository
- type RedisProbeRepository
- func (rpr *RedisProbeRepository) Delete(probe Probe) error
- func (rpr *RedisProbeRepository) FindAll() ([]Probe, error)
- func (rpr *RedisProbeRepository) FindLatestValues(probe Probe, limit int) ([]interface{}, *time.Time, error)
- func (rpr *RedisProbeRepository) HasHeartbeat(probe Probe) (bool, error)
- func (rpr *RedisProbeRepository) SetHeartbeat(probe Probe, sleep int) error
- type RedisSeriesRepository
- func (rsr *RedisSeriesRepository) ChunkSize(seriesType SeriesType) int
- func (rsr *RedisSeriesRepository) FindCPU(probe Probe, seriesType SeriesType) (Series, Series, Series, error)
- func (rsr *RedisSeriesRepository) FindDisk(probe Probe, seriesType SeriesType, path string) (Series, Series, Series, error)
- func (rsr *RedisSeriesRepository) FindDiskPaths(probe Probe) ([]string, error)
- func (rsr *RedisSeriesRepository) FindMemory(probe Probe, seriesType SeriesType) (Series, Series, Series, error)
- type Series
- type SeriesRepository
- type SeriesType
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoRecord error. ErrNoRecord = errors.New("models: no matching record found") // ErrInvalidLimit error. ErrInvalidLimit = errors.New("models: invalid limit") )
Functions ¶
This section is empty.
Types ¶
type Alarm ¶ added in v1.4.0
type Alarm struct { CPU float64 `redis:"cpu"` Memory float64 `redis:"memory"` Disk float64 `redis:"disk"` }
Alarm type.
type AlarmRepository ¶ added in v1.4.0
AlarmRepository type.
type ProbeRepository ¶ added in v1.5.0
type ProbeRepository interface { FindAll() ([]Probe, error) FindLatestValues(Probe, int) ([]interface{}, *time.Time, error) HasHeartbeat(Probe) (bool, error) SetHeartbeat(Probe, int) error Delete(Probe) error }
ProbeRepository type.
type RedisAlarmRepository ¶ added in v1.4.0
RedisAlarmRepository type.
type RedisProbeRepository ¶ added in v1.5.0
RedisProbeRepository type.
func (*RedisProbeRepository) Delete ¶ added in v1.9.0
func (rpr *RedisProbeRepository) Delete(probe Probe) error
Delete function.
func (*RedisProbeRepository) FindAll ¶ added in v1.5.0
func (rpr *RedisProbeRepository) FindAll() ([]Probe, error)
FindAll function.
func (*RedisProbeRepository) FindLatestValues ¶ added in v1.8.0
func (rpr *RedisProbeRepository) FindLatestValues(probe Probe, limit int) ([]interface{}, *time.Time, error)
FindLatestValues function.
func (*RedisProbeRepository) HasHeartbeat ¶ added in v1.8.0
func (rpr *RedisProbeRepository) HasHeartbeat(probe Probe) (bool, error)
HasHeartbeat function.
func (*RedisProbeRepository) SetHeartbeat ¶ added in v1.8.0
func (rpr *RedisProbeRepository) SetHeartbeat(probe Probe, sleep int) error
SetHeartbeat function.
type RedisSeriesRepository ¶
RedisSeriesRepository type.
func (*RedisSeriesRepository) ChunkSize ¶ added in v1.6.1
func (rsr *RedisSeriesRepository) ChunkSize(seriesType SeriesType) int
ChunkSize function.
func (*RedisSeriesRepository) FindCPU ¶
func (rsr *RedisSeriesRepository) FindCPU(probe Probe, seriesType SeriesType) (Series, Series, Series, error)
FindCPU function.
func (*RedisSeriesRepository) FindDisk ¶
func (rsr *RedisSeriesRepository) FindDisk(probe Probe, seriesType SeriesType, path string) (Series, Series, Series, error)
FindDisk function.
func (*RedisSeriesRepository) FindDiskPaths ¶
func (rsr *RedisSeriesRepository) FindDiskPaths(probe Probe) ([]string, error)
FindDiskPaths function.
func (*RedisSeriesRepository) FindMemory ¶
func (rsr *RedisSeriesRepository) FindMemory(probe Probe, seriesType SeriesType) (Series, Series, Series, error)
FindMemory function.
type SeriesRepository ¶
type SeriesRepository interface { FindCPU(Probe, SeriesType) (Series, Series, Series, error) FindMemory(Probe, SeriesType) (Series, Series, Series, error) FindDisk(Probe, SeriesType, string) (Series, Series, Series, error) FindDiskPaths(Probe) ([]string, error) ChunkSize(seriesType SeriesType) int }
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" )
Click to show internal directories.
Click to hide internal directories.