placement

package
v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 24 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// PlacementDequeueLimit is the limit which placement processor get the
	// placements
	PlacementDequeueLimit int `yaml:"placement_dequeue_limit"`

	// GetPlacementsTimeout is the timeout value for placement processor to
	// call GetPlacements
	GetPlacementsTimeout int `yaml:"get_placements_timeout_ms"`
}

Config is placement processor specific config

type Metrics

type Metrics struct {
	// Increment this counter when we see failure to
	// populate the task's volume secret from DB
	TaskPopulateSecretFail   tally.Counter
	TaskRequeuedOnLaunchFail tally.Counter

	GetPlacement              tally.Counter
	GetPlacementFail          tally.Counter
	GetPlacementsCallDuration tally.Timer
}

Metrics is the struct containing all the counters that track internal state of placement processor.

func NewMetrics

func NewMetrics(scope tally.Scope) *Metrics

NewMetrics returns a new Metrics struct, with all metrics initialized and rooted at the given tally.Scope

type Processor

type Processor interface {
	// Start starts the placement processor goroutines
	Start() error
	// Stop stops the placement processor goroutines
	Stop() error
}

Processor defines the interface of placement processor which dequeues placed tasks and sends them to host manager via lifecyclemgr.

func InitProcessor

func InitProcessor(
	d *yarpc.Dispatcher,
	resMgrClientName string,
	jobFactory cached.JobFactory,
	goalStateDriver goalstate.Driver,
	hmVersion api.Version,
	ormStore *ormobjects.Store,
	config *Config,
	parent tally.Scope,
) Processor

InitProcessor initializes placement processor

Jump to

Keyboard shortcuts

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