package events
import "github.com/mesos/mesos-go/api/v1/lib/executor/events"
Index ¶
- Constants
- type Handler
- type HandlerFunc
- type HandlerFuncs
- func (hs HandlerFuncs) HandleEvent(ctx context.Context, e *executor.Event) (err error)
- func (hs HandlerFuncs) Otherwise(f HandlerFunc) HandlerFunc
- type Handlers
Constants ¶
const NoopHandler = noopHandler(0)
NoopHandler is a Handler that does nothing and always returns nil
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[executor.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[executor.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.
Source Files ¶
- Version
- v0.0.11 (latest)
- Published
- May 15, 2020
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 2 hours ago –
Tools for package owners.