Documentation ¶
Index ¶
Constants ¶
const NoopHandler = noopHandler(0)
NoopHandler is a Handler that does nothing and always returns nil
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler is invoked upon the occurrence of some scheduler event that is generated by some other component in the Mesos ecosystem (e.g. master, agent, executor, etc.)
type HandlerFunc ¶
HandlerFunc is a functional adaptation of the Handler interface
func (HandlerFunc) HandleEvent ¶
HandleEvent implements Handler for HandlerFunc
type HandlerFuncs ¶
type HandlerFuncs map[scheduler.Event_Type]HandlerFunc
HandlerFuncs executes an event HandlerFunc according to the event's type
func (HandlerFuncs) HandleEvent ¶
HandleEvent implements Handler for HandlerFuncs
func (HandlerFuncs) Otherwise ¶
func (hs HandlerFuncs) Otherwise(f HandlerFunc) HandlerFunc
Otherwise returns a HandlerFunc that attempts to process an event with the HandlerFuncs map; unmatched event types are processed by the given HandlerFunc. A nil HandlerFunc parameter is effecitvely a noop.
type Handlers ¶
type Handlers map[scheduler.Event_Type]Handler
Handlers executes an event Handler according to the event's type
func (Handlers) HandleEvent ¶
HandleEvent implements Handler for Handlers
func (Handlers) Otherwise ¶
func (hs Handlers) Otherwise(f HandlerFunc) HandlerFunc
Otherwise returns a HandlerFunc that attempts to process an event with the Handlers map; unmatched event types are processed by the given HandlerFunc. A nil HandlerFunc parameter is effecitvely a noop.