Provisioning: Mark repository as unhealthy if hooks fail (#109788)
This commit is contained in:
+16
-3
@@ -4,12 +4,17 @@
|
||||
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
provisioningv0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
|
||||
)
|
||||
|
||||
// HealthStatusApplyConfiguration represents a declarative configuration of the HealthStatus type for use
|
||||
// with apply.
|
||||
type HealthStatusApplyConfiguration struct {
|
||||
Healthy *bool `json:"healthy,omitempty"`
|
||||
Checked *int64 `json:"checked,omitempty"`
|
||||
Message []string `json:"message,omitempty"`
|
||||
Healthy *bool `json:"healthy,omitempty"`
|
||||
Error *provisioningv0alpha1.HealthFailureType `json:"error,omitempty"`
|
||||
Checked *int64 `json:"checked,omitempty"`
|
||||
Message []string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// HealthStatusApplyConfiguration constructs a declarative configuration of the HealthStatus type for use with
|
||||
@@ -26,6 +31,14 @@ func (b *HealthStatusApplyConfiguration) WithHealthy(value bool) *HealthStatusAp
|
||||
return b
|
||||
}
|
||||
|
||||
// WithError sets the Error field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Error field is set to the value of the last call.
|
||||
func (b *HealthStatusApplyConfiguration) WithError(value provisioningv0alpha1.HealthFailureType) *HealthStatusApplyConfiguration {
|
||||
b.Error = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithChecked sets the Checked field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Checked field is set to the value of the last call.
|
||||
|
||||
Reference in New Issue
Block a user