You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
661 B
Go
22 lines
661 B
Go
2 years ago
|
package database
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"git.phc.dm.unipi.it/phc/cluster-dashboard/backend/model"
|
||
|
)
|
||
|
|
||
|
type Database interface {
|
||
2 years ago
|
GetNode(hostname string) (*model.Node, error)
|
||
|
GetJob(id string) (*model.Job, error)
|
||
2 years ago
|
|
||
|
AllNodes() ([]*model.Node, error)
|
||
|
AllJobs() ([]*model.Job, error)
|
||
|
|
||
|
QueryTemperatureSamples(from, to time.Time) ([]model.Sample[float64], error)
|
||
|
QueryMemorySamples(from, to time.Time) ([]model.Sample[int64], error)
|
||
|
QueryStorageSamples(from, to time.Time) ([]model.Sample[int64], error)
|
||
|
QueryNetworkUploadSamples(from, to time.Time) ([]model.Sample[int64], error)
|
||
|
QueryNetworkDownloadSamples(from, to time.Time) ([]model.Sample[int64], error)
|
||
|
}
|