Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitEventHandler ¶
func InitEventHandler( d *yarpc.Dispatcher, parent tally.Scope, schedulerClient mpb.SchedulerClient, resmgrClient resmgrsvc.ResourceManagerServiceYARPCClient, backgroundMgr background.Manager, ranker binpacking.Ranker, hostMgrConfig config.Config, processor watchevent.WatchProcessor, hostPoolManager manager.HostPoolManager)
InitEventHandler initializes the event handler for offers
Types ¶
type EventHandler ¶
type EventHandler interface { // Start starts the offer event handler, after which the handler will be // ready to process process offer events from an Mesos inbound. // Offers sent to the handler before `Start()` could be silently discarded. Start() error // Stop stops the offer event handlers and clears cached offers in pool. // Offers sent to the handler after `Stop()` could be silently discarded. Stop() error // GetOfferPool returns the underlying Pool holding the offers. GetOfferPool() offerpool.Pool // Get the handler for eventstream GetEventStreamHandler() *eventstream.Handler // SetHostPoolManager set host pool manager in the event handler. // It should be called during event handler initialization. SetHostPoolManager(manager manager.HostPoolManager) }
EventHandler defines the interface for offer event handler that is called by leader election callbacks
func GetEventHandler ¶
func GetEventHandler() EventHandler
GetEventHandler returns the handler for Mesos offer events. This function assumes the handler has been initialized as part of the InitEventHandler function. TODO: We should start a study of https://github.com/uber-common/inject and see whether we feel comfortable of using it.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics tracks various metrics at task state level.
func NewMetrics ¶
NewMetrics returns a new Metrics struct, with all metrics initialized and rooted at the given tally.Scope
Click to show internal directories.
Click to hide internal directories.