Documentation
¶
Index ¶
- Constants
- func FetchStateAndBuildZones(logger lager.Logger, workPool *workpool.WorkPool, ...) map[string]Zone
- func New(logger lager.Logger, delegate auctiontypes.AuctionRunnerDelegate, ...) *auctionRunner
- type Batch
- type Cell
- func (c *Cell) Commit() rep.Work
- func (c *Cell) MatchPlacementTags(placementTags []string) bool
- func (c *Cell) MatchRootFS(rootFS string) bool
- func (c *Cell) MatchVolumeDrivers(volumeDrivers []string) bool
- func (c *Cell) ReserveLRP(lrp *rep.LRP) error
- func (c *Cell) ReserveTask(task *rep.Task) error
- func (c *Cell) ScoreForLRP(lrp *rep.LRP, startingContainerWeight, binPackFirstFitWeight float64) (float64, error)
- func (c *Cell) ScoreForTask(task *rep.Task, startingContainerWeight float64) (float64, error)
- func (c *Cell) StartingContainerCount() int
- func (c *Cell) State() rep.CellState
- type CellResourceState
- type Scheduler
- type SortableLRPAuctions
- type SortableTaskAuctions
- type Work
- type Zone
Constants ¶
View Source
const LocalityOffset = 1000
View Source
const MinBinPackFirstFitWeight = 0.0
Variables ¶
This section is empty.
Functions ¶
func FetchStateAndBuildZones ¶
func FetchStateAndBuildZones(logger lager.Logger, workPool *workpool.WorkPool, clients map[string]rep.Client, metricEmitter auctiontypes.AuctionMetricEmitterDelegate, binPackFirstFitWeight float64) map[string]Zone
func New ¶
func New( logger lager.Logger, delegate auctiontypes.AuctionRunnerDelegate, metricEmitter auctiontypes.AuctionMetricEmitterDelegate, clock clock.Clock, workPool *workpool.WorkPool, binPackFirstFitWeight float64, startingContainerWeight float64, startingContainerCountMaximum int, ) *auctionRunner
Types ¶
type Batch ¶
type Batch struct { HasWork chan Work // contains filtered or unexported fields }
func (*Batch) AddLRPStarts ¶
func (b *Batch) AddLRPStarts(starts []auctioneer.LRPStartRequest, traceID string)
func (*Batch) AddTasks ¶
func (b *Batch) AddTasks(tasks []auctioneer.TaskStartRequest, traceID string)
func (*Batch) DedupeAndDrain ¶
func (b *Batch) DedupeAndDrain() ([]auctiontypes.LRPAuction, []auctiontypes.TaskAuction)
type Cell ¶
func (*Cell) MatchPlacementTags ¶
func (*Cell) MatchRootFS ¶
func (*Cell) MatchVolumeDrivers ¶
func (*Cell) ScoreForLRP ¶
func (*Cell) ScoreForTask ¶
func (*Cell) StartingContainerCount ¶
type CellResourceState ¶
type CellResourceState struct { CellID string `json:"cell_id"` RootFSProviders rep.RootFSProviders AvailableResources rep.Resources TotalResources rep.Resources PlacementTags []string OptionalPlacementTags []string }
func NewCellResourceState ¶
func NewCellResourceState(state rep.CellState) CellResourceState
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func (*Scheduler) Schedule ¶
func (s *Scheduler) Schedule(auctionRequest auctiontypes.AuctionRequest) auctiontypes.AuctionResults
Schedule takes in a set of job requests (LRP start auctions and task starts) and assigns the work to available cells according to the diego scoring algorithm. The scheduler is single-threaded. It determines scheduling of jobs one at a time so that each calculation reflects available resources correctly. It commits the work in batches at the end, for better network performance. Schedule returns AuctionResults, indicating the success or failure of each requested job.
type SortableLRPAuctions ¶
type SortableLRPAuctions []auctiontypes.LRPAuction
func (SortableLRPAuctions) Len ¶
func (a SortableLRPAuctions) Len() int
func (SortableLRPAuctions) Less ¶
func (a SortableLRPAuctions) Less(i, j int) bool
func (SortableLRPAuctions) Swap ¶
func (a SortableLRPAuctions) Swap(i, j int)
type SortableTaskAuctions ¶
type SortableTaskAuctions []auctiontypes.TaskAuction
func (SortableTaskAuctions) Len ¶
func (a SortableTaskAuctions) Len() int
func (SortableTaskAuctions) Less ¶
func (a SortableTaskAuctions) Less(i, j int) bool
func (SortableTaskAuctions) Swap ¶
func (a SortableTaskAuctions) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.