Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decorator ¶
Decorator functions typically modify behavior of the given delegate Handler.
type Decorators ¶
type Decorators []Decorator
Decorators aggregates Decorator functions
func (Decorators) Apply ¶
func (ds Decorators) Apply(h Handler) Handler
Apply applies the Decorators in the order they're listed such that the last Decorator invoked generates the final (wrapping) Handler that is ultimately returned.
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.)
func AcknowledgeUpdates ¶
AcknowledgeUpdates generates a Handler that sends an Acknowledge call to Mesos for every UPDATE event that's received.
func OnceFunc ¶
func OnceFunc(h HandlerFunc) Handler
func WhenFunc ¶
func WhenFunc(p Happens, h HandlerFunc) Handler
type HandlerFunc ¶
HandlerFunc is a functional adaptation of the Handler interface
func (HandlerFunc) HandleEvent ¶
func (f HandlerFunc) HandleEvent(e *scheduler.Event) error
HandleEvent implements Handler for HandlerFunc
type Happens ¶
type Happens interface {
Happens() scheduler.EventPredicate
}
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
Mux maps event types to Handlers (only one Handler for each type). A "default" Handler implementation may be provided to handle cases in which there is no registered Handler for specific event type.
func (*Mux) HandleEvent ¶
HandleEvent implements Handler for Mux
type Option ¶
Option is a functional configuration option that returns an "undo" option that reverts the change made by the option.
func DefaultHandler ¶
DefaultHandler returns an option that configures the default handler that's invoked in cases where there is no Handler registered for specific event type.
func Handle ¶
func Handle(et scheduler.Event_Type, eh Handler) Option
Handle returns an option that configures a Handler to handle a specific event type. If the specified Handler is nil then any currently registered Handler for the given event type is deleted upon application of the returned Option.
func Map ¶
func Map(handlers map[scheduler.Event_Type]Handler) (option Option)
Map returns an Option that configures multiple Handler objects.
func MapFuncs ¶
func MapFuncs(handlers map[scheduler.Event_Type]HandlerFunc) (option Option)
MapFuncs is the functional adaptation of Map
type PredicateBool ¶
type PredicateBool func() bool
func (PredicateBool) Happens ¶
func (b PredicateBool) Happens() scheduler.EventPredicate