For example, if you wanted a worker that could move files, you could define a MoveFile interface. The interface tells
you where the file is now, and where it should be. Your worker should then add the interface name (MoveFile) to it's
list of Descriptions it knows how to deal with, provided by Worker::getDescriptionTypes().

Task - History

╭────────────────────────────╮
│ (i) Task\History │
├────────────────────────────┤
│ <History> addEvent(<Event>)│ ← Add a new event to the history
│ <Event[]> getEvents() │ ← Returns an array of all events
│ <Event> getLastEvent() │ ← Returns the last event or null if there is nothing in the history
╰────────────────────────────╯

Task - History - Event

A single event in the tasks history. A new event should be created when the Task leaves the Pool to
be processed. The event is completed when the Pool is asked to complete or defer the task.

╭───────────────────────────────────────╮
│ (i) Task\History\Event │
├───────────────────────────────────────┤
│ <Event> startEvent() │ ← Events should only be created through this static method
├───────────────────────────────────────┤
│ <Event> endEvent(<Result>, <Reason>) │ ← End the event with a Result, and optionally Reason
│ <float> getStartTime() │ ← Get the event start time. This should be the time the event was created
│ <float> getEndTime() │ ← Get the end time or null if it's in progress
│ <Result> getResult() │ ← Always returns a Result, though it defaults to 'incomplete'
│ <Reason> getReason() │ ← Always returns a Reason, though it's empty by default
│ <string> __toString() │ ← Should return a string representation of the event for logging purposes
╰───────────────────────────────────────╯

Worker

Workers are where the Tasks are processed. They may or may not be asynchronous and therefore should always return a
Promise.

Workers may also be able to handle multiple types of Task Descriptions, and will therefore always
return an array of strings. The best practice, however, should be to have one worker per Task Description

Mediator

The mediator is responsible for taking a task and passing it to the correct worker.

╭──────────────────────────────────╮
│ (i) Mediator │
├──────────────────────────────────┤
│ <Mediator> addWorker(<Worker>) │ ← Inform the mediator about a Worker. Returns a reference to itself
│ <Promise> process(<Task>) │ ← Pass a task. This will return a promise from a Worker to do the task or throw an
╰──────────────────────────────────╯ exception if no appropriate Worker was found.

Promise

Worker Modules

You can create a module of workers for Masonry using the WorkerModule class. It is a cross between a Worker and a
Mediator mediating between it's internal workers, but exposing itself to other mediators as a worker.