placement

package
v0.0.0-...-d2b1cdf Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

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 {
	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 task launcher

func InitProcessor

func InitProcessor(
	d *yarpc.Dispatcher,
	resMgrClientName string,
	jobFactory cached.JobFactory,
	goalStateDriver goalstate.Driver,
	taskLauncher launcher.Launcher,
	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