Documentation ¶
Index ¶
- type Balancer
- type BalancerConfig
- type ElectRequest
- type SafeClusters
- type Scheduler
- func (s *Scheduler) AddOrUpdateCluster(clusterKey string, data core.ClusterUpdate)
- func (s *Scheduler) ElectRouterHostRequest(ctx core.Context) (*core.RouterHost, error)
- func (s *Scheduler) Start()
- func (s *Scheduler) Stop()
- func (s *Scheduler) UpdateRouterStats(clusterKey string, routerHostKey string, action StatsOperationAction)
- type StatsOperationAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
type Balancer struct { Scheduler *Scheduler // contains filtered or unexported fields }
func NewBalancer ¶
func (*Balancer) HandleClientConnect ¶
func (*Balancer) HandleClientDisconnect ¶
func (*Balancer) ListenHttp ¶
func (*Balancer) ListenHttps ¶
type BalancerConfig ¶
type BalancerConfig struct {
// contains filtered or unexported fields
}
type ElectRequest ¶
type ElectRequest struct { Context core.Context Response chan core.RouterHost Err chan error }
type SafeClusters ¶
type SafeClusters struct {
// contains filtered or unexported fields
}
type Scheduler ¶
type Scheduler struct { StatsHandler *stats.StatsHandler ResetStats chan bool // contains filtered or unexported fields }
Scheduler handles: - The overall state (clusters, router hosts) - Health-Check-Results - Election of target router hosts
func NewScheduler ¶
func NewScheduler() *Scheduler
func (*Scheduler) AddOrUpdateCluster ¶
func (s *Scheduler) AddOrUpdateCluster(clusterKey string, data core.ClusterUpdate)
func (*Scheduler) ElectRouterHostRequest ¶
func (*Scheduler) UpdateRouterStats ¶
func (s *Scheduler) UpdateRouterStats(clusterKey string, routerHostKey string, action StatsOperationAction)
type StatsOperationAction ¶
type StatsOperationAction int
const ( IncrementConnection StatsOperationAction = iota DecrementConnection IncrementRefused )
Click to show internal directories.
Click to hide internal directories.