Documentation ¶
Index ¶
- Variables
- type Alarm
- type AlarmRepository
- type Probe
- type ProbeRepository
- type ProcessSeries
- type ProcessValue
- 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, ProcessSeries, ProcessSeries, ProcessSeries, 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) FindLoad(probe Probe, seriesType SeriesType) (Series, Series, Series, error)
- func (rsr *RedisSeriesRepository) FindMemory(probe Probe, seriesType SeriesType) (Series, Series, Series, ProcessSeries, ProcessSeries, ProcessSeries, 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") )
View Source
var SeriesTypes = []map[string]interface{}{ { "name": "Last 5 minutes", "value": Last5Minutes, }, { "name": "Last 15 minutes", "value": Last15Minutes, }, { "name": "Last 30 minutes", "value": Last30Minutes, }, { "name": "Last 1 hour", "value": Last1Hour, }, { "name": "Last 3 hours", "value": Last3Hours, }, { "name": "Last 6 hours", "value": Last6Hours, }, { "name": "Last 12 hours", "value": Last12Hours, }, { "name": "Last 24 hours", "value": Last24Hours, }, { "name": "Last 2 days", "value": Last2Days, }, { "name": "Last 7 days", "value": Last7Days, }, { "name": "Last 30 days", "value": Last30Days, }, }
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 ProcessValue ¶ added in v1.12.0
ProcessValue 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, ProcessSeries, ProcessSeries, ProcessSeries, 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) FindLoad ¶ added in v1.12.0
func (rsr *RedisSeriesRepository) FindLoad(probe Probe, seriesType SeriesType) (Series, Series, Series, error)
FindLoad function.
func (*RedisSeriesRepository) FindMemory ¶
func (rsr *RedisSeriesRepository) FindMemory(probe Probe, seriesType SeriesType) (Series, Series, Series, ProcessSeries, ProcessSeries, ProcessSeries, error)
FindMemory function.
type SeriesRepository ¶
type SeriesRepository interface { FindCPU(Probe, SeriesType) (Series, Series, Series, ProcessSeries, ProcessSeries, ProcessSeries, error) FindMemory(Probe, SeriesType) (Series, Series, Series, ProcessSeries, ProcessSeries, ProcessSeries, error) FindLoad(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 ( // Last5Minutes series. Last5Minutes SeriesType = "last_5_minutes" // Last15Minutes series. Last15Minutes SeriesType = "last_15_minutes" // Last30Minutes series. Last30Minutes SeriesType = "last_30_minutes" // Last1Hour series. Last1Hour SeriesType = "last_1_hour" // Last3Hours series. Last3Hours SeriesType = "last_3_hours" // Last6Hours series. Last6Hours SeriesType = "last_6_hours" // Last12Hours series. Last12Hours SeriesType = "last_12_hours" // Last24Hours series. Last24Hours SeriesType = "last_24_hours" // Last2Days series. Last2Days SeriesType = "last_2_days" // Last7Days series. Last7Days SeriesType = "last_7_days" // Last30Days series. Last30Days SeriesType = "last_30_days" )
Click to show internal directories.
Click to hide internal directories.