Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator struct {
// contains filtered or unexported fields
}
Calculator is responsible for calculating the entitlements for all the leaf resource pools based on the demand, free resources and share.
func NewCalculator ¶
func NewCalculator( calculationPeriod time.Duration, parent tally.Scope, dispatcher *yarpc.Dispatcher, tree respool.Tree, hmApiVersion api.Version, useHostPool bool, ) *Calculator
NewCalculator initializes the entitlement Calculator
func (*Calculator) Start ¶
func (c *Calculator) Start() error
Start starts the entitlement calculation in a goroutine
type CapacityManager ¶
type CapacityManager interface { GetCapacity( ctx context.Context, ) ( total map[string]float64, slack map[string]float64, err error, ) // Return capacity of each host-pool. GetHostPoolCapacity(context.Context) ( map[string]*ResourceCapacity, error, ) }
CapacityManager interface defines method to get cluster capacity.
Click to show internal directories.
Click to hide internal directories.