placement

package
v1.6.0-gr0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RejectedError = errors.New("application rejected: no placement rule matched")

RejectedError is the standard error returned if placement has failed

Functions

This section is empty.

Types

type AppPlacementManager

type AppPlacementManager struct {
	locking.RWMutex
	// contains filtered or unexported fields
}

func NewPlacementManager

func NewPlacementManager(rules []configs.PlacementRule, queueFunc func(string) *objects.Queue) *AppPlacementManager

func (*AppPlacementManager) GetRulesDAO

func (m *AppPlacementManager) GetRulesDAO() []*dao.RuleDAO

GetRulesDAO returns a list of RuleDAO objects of the configured rules

func (*AppPlacementManager) PlaceApplication

func (m *AppPlacementManager) PlaceApplication(app *objects.Application) error

PlaceApplication executes the rules for the passed in application. On success the queueName of the application is set to the queue the application wil run in. On failure the queueName is set to "" and an error is returned.

func (*AppPlacementManager) UpdateRules

func (m *AppPlacementManager) UpdateRules(rules []configs.PlacementRule) error

UpdateRules sets the rules for an active placement manager

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL