mirror of
https://github.com/inexio/thola.git
synced 2026-10-24 03:08:55 +03:00
24 lines
544 B
Go
24 lines
544 B
Go
package request
|
|
|
|
import (
|
|
"context"
|
|
"github.com/inexio/go-monitoringplugin"
|
|
)
|
|
|
|
// CheckCPULoadRequest
|
|
//
|
|
// CheckCPULoadRequest is the request struct for the check cpu load request.
|
|
//
|
|
// swagger:model
|
|
type CheckCPULoadRequest struct {
|
|
CheckDeviceRequest
|
|
CPULoadThresholds monitoringplugin.Thresholds `json:"cpuLoadThresholds" xml:"cpuLoadThresholds"`
|
|
}
|
|
|
|
func (r *CheckCPULoadRequest) validate(ctx context.Context) error {
|
|
if err := r.CPULoadThresholds.Validate(); err != nil {
|
|
return err
|
|
}
|
|
return r.CheckDeviceRequest.validate(ctx)
|
|
}
|