Documentation ¶
Index ¶
- type BackendServicesMap
- type FakeBackendService
- type FakeBackendServiceSyncer
- func (h *FakeBackendServiceSyncer) DeleteBackendServices(ports []ingressbe.ServicePort) error
- func (h *FakeBackendServiceSyncer) EnsureBackendService(lbName string, ports []ingressbe.ServicePort, ...) (BackendServicesMap, error)
- func (h *FakeBackendServiceSyncer) RemoveFromClusters(ports []ingressbe.ServicePort, removeIGLinks []string) error
- type NamedPortsMap
- type Syncer
- type SyncerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendServicesMap ¶
type BackendServicesMap map[string]*compute.BackendService
BackendServicesMap is a map from the kubernetes service name to the corresponding GCE backend service.
type FakeBackendService ¶
type FakeBackendService struct { LBName string Port ingressbe.ServicePort HCMap healthcheck.HealthChecksMap NPMap NamedPortsMap IGLinks []string }
FakeBackendService is a fake representation of a backend service ensured by invoking EnsureBackendService.
type FakeBackendServiceSyncer ¶
type FakeBackendServiceSyncer struct { // List of backend services that this has been asked to ensure. EnsuredBackendServices []FakeBackendService }
FakeBackendServiceSyncer is a fake implementation of SyncerInterface to be used in tests.
func (*FakeBackendServiceSyncer) DeleteBackendServices ¶
func (h *FakeBackendServiceSyncer) DeleteBackendServices(ports []ingressbe.ServicePort) error
DeleteBackendServices deletes the backend services that EnsureBackendService would have created. See the interface for more details.
func (*FakeBackendServiceSyncer) EnsureBackendService ¶
func (h *FakeBackendServiceSyncer) EnsureBackendService(lbName string, ports []ingressbe.ServicePort, hcMap healthcheck.HealthChecksMap, npMap NamedPortsMap, igLinks []string, forceUpdate bool) (BackendServicesMap, error)
EnsureBackendService ensures that the backend service exists. See interface for more details.
func (*FakeBackendServiceSyncer) RemoveFromClusters ¶
func (h *FakeBackendServiceSyncer) RemoveFromClusters(ports []ingressbe.ServicePort, removeIGLinks []string) error
RemoveFromClusters removes the given backend services corresponsding to the given ports from clusters corresponding to the given removeIGLinks. See the interface for more details.
type NamedPortsMap ¶
NamedPortsMap is a map of port number to the named port for that port.
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer manages GCP backend services for multicluster GCP L7 load balancers.
func (*Syncer) DeleteBackendServices ¶
func (b *Syncer) DeleteBackendServices(ports []ingressbe.ServicePort) error
DeleteBackendServices deletes all backend services that would have been created by EnsureBackendService. See interface for more details.
func (*Syncer) EnsureBackendService ¶
func (b *Syncer) EnsureBackendService(lbName string, ports []ingressbe.ServicePort, hcMap healthcheck.HealthChecksMap, npMap NamedPortsMap, igLinks []string, forceUpdate bool) (BackendServicesMap, error)
EnsureBackendService ensures that the required backend services exist. See interface for more details.
func (*Syncer) RemoveFromClusters ¶
func (b *Syncer) RemoveFromClusters(ports []ingressbe.ServicePort, removeIGLinks []string) error
RemoveFromClusters removes the clusters corresponding to the given removeIGLinks from the existing backend services corresponding to the given ports. See interface for more details.
type SyncerInterface ¶
type SyncerInterface interface { // EnsureBackendService ensures that the required backend services // exist. forceUpdate must be true in order to modify an existing // BackendService. // Returns a map of the ensured backend services. // In case of no error, the map will contain services for all the given array of ports. EnsureBackendService(lbName string, ports []ingressbe.ServicePort, hcMap healthcheck.HealthChecksMap, npMap NamedPortsMap, igLinks []string, forceUpdate bool) (BackendServicesMap, error) // DeleteBackendServices deletes all backend services that would have been created by EnsureBackendService. DeleteBackendServices(ports []ingressbe.ServicePort) error // RemoveFromClusters removes the clusters corresponding to the given removeIGLinks from the existing backend services corresponding to the given ports. RemoveFromClusters(ports []ingressbe.ServicePort, removeIGLinks []string) error }
SyncerInterface is an interface to manage GCP backend services.
func NewBackendServiceSyncer ¶
func NewBackendServiceSyncer(namer *utilsnamer.Namer, bsp ingressbe.BackendServices) SyncerInterface
NewBackendServiceSyncer returns a new instance of syncer.
func NewFakeBackendServiceSyncer ¶
func NewFakeBackendServiceSyncer() SyncerInterface
NewFakeBackendServiceSyncer returns a new instance of the fake syncer.