Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadBalancer ¶ added in v1.7.0
type LoadBalancer struct { Services map[string]*ServicePool ServicesMux sync.RWMutex }
func (*LoadBalancer) Register ¶ added in v1.7.1
func (loadbalancer *LoadBalancer) Register(service *Service)
type Service ¶
type Service struct { Name string URL *url.URL At time.Time Alive bool // contains filtered or unexported fields }
type ServicePool ¶
type ServicePool struct { Services []*Service Current uint64 // contains filtered or unexported fields }
func (*ServicePool) FirstKnownInstance ¶ added in v1.7.0
func (servicePool *ServicePool) FirstKnownInstance(service *Service) (bool, int)
func (*ServicePool) GetNextService ¶ added in v1.7.0
func (servicePool *ServicePool) GetNextService() *Service
Loop over entire backends to find out an Alive and active backend service
func (*ServicePool) UpdateService ¶
func (servicePool *ServicePool) UpdateService(service *Service)
Click to show internal directories.
Click to hide internal directories.