Documentation ¶
Index ¶
- func FakeL4(cloud *gce.Cloud, recorderFactory events.RecorderProducer) *l4HealthChecks
- func InitializeL4(cloud *gce.Cloud, recorderFactory events.RecorderProducer)
- func L4() *l4HealthChecks
- type EnsureL4HealthCheckResult
- type HealthCheckProvider
- type HealthChecker
- type HealthChecks
- type L4HealthChecks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakeL4 ¶ added in v1.17.0
func FakeL4(cloud *gce.Cloud, recorderFactory events.RecorderProducer) *l4HealthChecks
FakeL4 creates instance of l4HealthChecks> USe for test only.
func InitializeL4 ¶ added in v1.17.0
func InitializeL4(cloud *gce.Cloud, recorderFactory events.RecorderProducer)
InitializeL4 creates singleton instance, must be run before L4() func
Types ¶
type EnsureL4HealthCheckResult ¶ added in v1.17.0
type HealthCheckProvider ¶
type HealthCheckProvider interface { CreateHTTPHealthCheck(hc *compute.HttpHealthCheck) error UpdateHTTPHealthCheck(hc *compute.HttpHealthCheck) error DeleteHTTPHealthCheck(name string) error GetHTTPHealthCheck(name string) (*compute.HttpHealthCheck, error) CreateAlphaHealthCheck(hc *computealpha.HealthCheck) error CreateBetaHealthCheck(hc *computebeta.HealthCheck) error CreateHealthCheck(hc *compute.HealthCheck) error UpdateAlphaHealthCheck(hc *computealpha.HealthCheck) error UpdateBetaHealthCheck(hc *computebeta.HealthCheck) error UpdateHealthCheck(hc *compute.HealthCheck) error DeleteHealthCheck(name string) error GetAlphaHealthCheck(name string) (*computealpha.HealthCheck, error) GetBetaHealthCheck(name string) (*computebeta.HealthCheck, error) GetHealthCheck(name string) (*compute.HealthCheck, error) }
HealthCheckProvider is an interface to manage a single GCE health check. TODO: (shance) convert this to use composite types
type HealthChecker ¶
type HealthChecker interface { // SyncServicePort syncs the healthcheck associated with the given // ServicePort and Pod Probe definition. // // `probe` can be nil if no probe exists. SyncServicePort(sp *utils.ServicePort, probe *v1.Probe) (string, error) Delete(name string, scope meta.KeyType) error Get(name string, version meta.Version, scope meta.KeyType) (*translator.HealthCheck, error) }
HealthChecker is an interface to manage cloud HTTPHealthChecks.
type HealthChecks ¶
type HealthChecks struct {
// contains filtered or unexported fields
}
HealthChecks manages health checks.
func NewHealthChecker ¶
func NewHealthChecker(cloud HealthCheckProvider, healthCheckPath string, defaultBackendSvc types.NamespacedName) *HealthChecks
NewHealthChecker creates a new health checker. cloud: the cloud object implementing SingleHealthCheck. defaultHealthCheckPath: is the HTTP path to use for health checks.
func (*HealthChecks) Delete ¶
func (h *HealthChecks) Delete(name string, scope meta.KeyType) error
Delete deletes the health check by port.
func (*HealthChecks) Get ¶
func (h *HealthChecks) Get(name string, version meta.Version, scope meta.KeyType) (*translator.HealthCheck, error)
Get returns the health check by port
func (*HealthChecks) SyncServicePort ¶ added in v1.9.0
func (h *HealthChecks) SyncServicePort(sp *utils.ServicePort, probe *v1.Probe) (string, error)
SyncServicePort implements HealthChecker.
type L4HealthChecks ¶ added in v1.17.0
type L4HealthChecks interface { // EnsureL4HealthCheck creates health check (and firewall rule) for l4 service EnsureL4HealthCheck(svc *v1.Service, namer namer.L4ResourcesNamer, sharedHC bool, scope meta.KeyType, l4Type utils.L4LBType, nodeNames []string) *EnsureL4HealthCheckResult // DeleteHealthCheck deletes health check (and firewall rule) for l4 service DeleteHealthCheck(svc *v1.Service, namer namer.L4ResourcesNamer, sharedHC bool, scope meta.KeyType, l4Type utils.L4LBType) (string, error) }
L4HealthChecks defines methods for creating and deleting health checks (and their firewall rules) for l4 services