Migrate existing health check settings
This commit is contained in:
parent
e3c7f070eb
commit
f65b35f766
4 changed files with 76 additions and 13 deletions
|
|
@ -125,6 +125,12 @@ func (h *HealthChecks) Get(port int64) (*HealthCheck, error) {
|
|||
return NewHealthCheck(hc), err
|
||||
}
|
||||
|
||||
// GetLegacy deletes legacy HTTP health checks
|
||||
func (h *HealthChecks) GetLegacy(port int64) (*compute.HttpHealthCheck, error) {
|
||||
name := h.namer.BeName(port)
|
||||
return h.cloud.GetHttpHealthCheck(name)
|
||||
}
|
||||
|
||||
// DeleteLegacy deletes legacy HTTP health checks
|
||||
func (h *HealthChecks) DeleteLegacy(port int64) error {
|
||||
name := h.namer.BeName(port)
|
||||
|
|
|
|||
|
|
@ -41,5 +41,6 @@ type HealthChecker interface {
|
|||
Sync(hc *HealthCheck) (string, error)
|
||||
Delete(port int64) error
|
||||
Get(port int64) (*HealthCheck, error)
|
||||
GetLegacy(port int64) (*compute.HttpHealthCheck, error)
|
||||
DeleteLegacy(port int64) error
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue