Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaxRelative ¶
Types ¶
type BalancerImpl ¶
type BalancerImpl struct {
// contains filtered or unexported fields
}
func NewBalancer ¶
func NewBalancer() (*BalancerImpl, error)
func (*BalancerImpl) RunBalancer ¶
func (b *BalancerImpl) RunBalancer(ctx context.Context)
type HostMetrics ¶
type HostMetrics []float64
func NewHostMetrics ¶
func NewHostMetrics() HostMetrics
func (HostMetrics) MaxRelative ¶
func (m HostMetrics) MaxRelative(threshold []float64) (val float64)
type ShardMetrics ¶
type ShardMetrics struct { ShardId string MetricsTotal []float64 MetricsKR map[string][]float64 // mean value for object by key range KeyCountKR map[string]int64 KeyCountRelKR map[string]map[string]int64 Master string TargetReplica string }
func NewShardMetrics ¶
func NewShardMetrics() *ShardMetrics
func (*ShardMetrics) SetMasterMetrics ¶
func (m *ShardMetrics) SetMasterMetrics(metrics HostMetrics)
func (*ShardMetrics) SetReplicaMetrics ¶
func (m *ShardMetrics) SetReplicaMetrics(metrics HostMetrics)
Click to show internal directories.
Click to hide internal directories.