auctioneer

package module
v0.0.0-...-2f1bf33 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2016 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

auctioneer

Runs diego auctions

####Learn more about Diego and its components at diego-design-notes

Documentation

Index

Constants

View Source
const (
	LRPAuctionsStarted  = metric.Counter("AuctioneerLRPAuctionsStarted")
	LRPAuctionsFailed   = metric.Counter("AuctioneerLRPAuctionsFailed")
	TaskAuctionsStarted = metric.Counter("AuctioneerTaskAuctionsStarted")
	TaskAuctionsFailed  = metric.Counter("AuctioneerTaskAuctionsFailed")
	FetchStatesDuration = metric.Duration("AuctioneerFetchStatesDuration")
)
View Source
const (
	CreateTaskAuctionsRoute = "CreateTaskAuctions"
	CreateLRPAuctionsRoute  = "CreateLRPAuctions"
)
View Source
const LockSchemaKey = "auctioneer_lock"

Variables

View Source
var Routes = rata.Routes{
	{Path: "/v1/tasks", Method: "POST", Name: CreateTaskAuctionsRoute},
	{Path: "/v1/lrps", Method: "POST", Name: CreateLRPAuctionsRoute},
}

Functions

func LockSchemaPath

func LockSchemaPath() string

Types

type Client

type Client interface {
	RequestLRPAuctions(lrpStart []*LRPStartRequest) error
	RequestTaskAuctions(tasks []*TaskStartRequest) error
}

func NewClient

func NewClient(auctioneerURL string) Client

type LRPStartRequest

type LRPStartRequest struct {
	ProcessGuid string   `json:"process_guid"`
	Domain      string   `json:"domain"`
	Indices     []int    `json:"indices"`
	Tags        []string `json:"environment_variables"`
	rep.Resource
}

func NewLRPStartRequest

func NewLRPStartRequest(processGuid, domain string, indices []int, res rep.Resource, tags []string) LRPStartRequest

func NewLRPStartRequestFromModel

func NewLRPStartRequestFromModel(d *models.DesiredLRP, indices ...int) LRPStartRequest

func NewLRPStartRequestFromSchedulingInfo

func NewLRPStartRequestFromSchedulingInfo(s *models.DesiredLRPSchedulingInfo, indices ...int) LRPStartRequest

func (*LRPStartRequest) Validate

func (lrpstart *LRPStartRequest) Validate() error

type Presence

type Presence struct {
	AuctioneerID      string `json:"auctioneer_id"`
	AuctioneerAddress string `json:"auctioneer_address"`
}

func NewPresence

func NewPresence(id, address string) Presence

func (Presence) Validate

func (a Presence) Validate() error

type ServiceClient

type ServiceClient interface {
	NewAuctioneerLockRunner(lager.Logger, Presence, time.Duration) (ifrit.Runner, error)
	CurrentAuctioneer() (Presence, error)
	CurrentAuctioneerAddress() (string, error)
}

func NewServiceClient

func NewServiceClient(session *consuladapter.Session, clock clock.Clock) ServiceClient

type TaskStartRequest

type TaskStartRequest struct {
	rep.Task
}

func NewTaskStartRequest

func NewTaskStartRequest(task rep.Task) TaskStartRequest

func NewTaskStartRequestFromModel

func NewTaskStartRequestFromModel(t *models.Task) TaskStartRequest

func (*TaskStartRequest) Validate

func (t *TaskStartRequest) Validate() error

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter
cmd
auctioneer command

Jump to

Keyboard shortcuts

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