Documentation ¶
Index ¶
- type ServiceCache
- func (svcc *ServiceCache) DeleteByAddr(ip net.IP, port uint16) bool
- func (svcc *ServiceCache) DeleteByID(id int64) bool
- func (svcc *ServiceCache) GetServiceByAddr(ip net.IP, port uint16) (service pb.Service, ok bool)
- func (svcc *ServiceCache) InitializeFrom(entries []*models.Service) error
- func (svcc *ServiceCache) Upsert(id int64, name, ns string, frontendIP net.IP, frontendPort uint16) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceCache ¶
type ServiceCache struct {
// contains filtered or unexported fields
}
ServiceCache is a cache of existing services.
func (*ServiceCache) DeleteByAddr ¶
func (svcc *ServiceCache) DeleteByAddr(ip net.IP, port uint16) bool
DeleteByAddr removes the cache entry identified by the given service frontend ip and port. It returns true if an entry was deleted.
func (*ServiceCache) DeleteByID ¶
func (svcc *ServiceCache) DeleteByID(id int64) bool
DeleteByID removes the cache entry identified by the given id. It returns true if an entry was deleted.
func (*ServiceCache) GetServiceByAddr ¶
GetServiceByAddr retrieves a service from the cache given its frontend IP and port. If the service was found in the cache, ok is true.
func (*ServiceCache) InitializeFrom ¶
func (svcc *ServiceCache) InitializeFrom(entries []*models.Service) error
InitializeFrom initializes the cache with the given list of services.
Click to show internal directories.
Click to hide internal directories.