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.

47 lines
1.2 KiB
Go

2 years ago
package executor
var _ Service = &Mock{}
type Mock struct {
SlurmQueueFunc func() ([]string, error)
SlurmJobsFunc func() ([]string, error)
NodeUptimeFunc func(hostname string) (string, error)
TemperatureFunc func(hostname string) (string, error)
MemoryUsageFunc func(hostname string) (string, error)
StorageUsageFunc func(hostname string) (string, error)
NetworkUploadFunc func(hostname string) (string, error)
NetworkDownloadFunc func(hostname string) (string, error)
}
func (m Mock) SlurmQueue() ([]string, error) {
return m.SlurmQueueFunc()
2 years ago
}
func (m Mock) SlurmJobs() ([]string, error) {
return m.SlurmJobsFunc()
2 years ago
}
func (m Mock) NodeUptime(hostname string) (string, error) {
return m.NodeUptimeFunc(hostname)
2 years ago
}
func (m Mock) Temperature(hostname string) (string, error) {
return m.TemperatureFunc(hostname)
2 years ago
}
func (m Mock) MemoryUsage(hostname string) (string, error) {
return m.MemoryUsageFunc(hostname)
2 years ago
}
func (m Mock) StorageUsage(hostname string) (string, error) {
return m.StorageUsageFunc(hostname)
2 years ago
}
func (m Mock) NetworkUpload(hostname string) (string, error) {
return m.NetworkUploadFunc(hostname)
2 years ago
}
func (m Mock) NetworkDownload(hostname string) (string, error) {
return m.NetworkDownloadFunc(hostname)
2 years ago
}