NAME

Mesos::Dispatcher - base class for Mesos dispatchers

DESCRIPTION

A parent class for event dispatchers to inherit from.

ATTRIBUTES

channel

A Mesos::Channel, used for sending event data from Mesos C++ callbacks to perl.

cb

A code ref to be invoked when an event is ready to be processed from the channel.

Normally this will be set by Mesos::Role::HasDispatcher.

METHODS

new

my $dispatcher = Mesos::Dispatcher->new(%args)

    OPTIONAL %args
        cb
        channel

call

A shortcut for invoking the cb attribute.

notify

recv

Receive event data from the channel. Returns undef if no event data is available.

send

wait

Wait for an event to be sent to the channel, invoke the cb attribute, and return the event arguments.