Pulsar v0.2.0 Pulsar View Source
This is the client API for Pulsar.
Pulsar manages a simple text-mode dashboard of jobs.
Jobs can be updated at any time; updates appear in place.
When a job is updated, it will briefly be repainted in bold and/or bright text, then be redrawn in standard text. This is to draw attention to changes.
Completed jobs bubble up above any incomplete jobs.
Jobs may have a status, which drives font color. Normal jobs are in white.
Jobs with status :ok
are in green.
Jobs with status :error
are in red.
Note that the actual colors are driven by the configuration of your terminal.
Pulsar has no way to determine if other output is occuring. Care should be taken that logging is redirected to a file. Pulsar is appropriate to generally short-lived applications such as command line tools, who can ensure that output, including logging, is directed away from the console.
Link to this section Summary
Functions
Completes a previously created job. No further updates to the job should be sent
Given a previously created job, updates the message for the job
Creates a new job using the local server
Creates a new job using a remote server, from the node
parameter
Pauses the dashboard
Pauses the dashboard on the indicated node
Sets the prefix for the job; this immediately precedes the message. Generally, the prefix provides a job with a title
Resumes the dashboard after a pause/1
Updates the status of the job.
status
should be :normal
, :ok
, or :error
Link to this section Functions
Completes a previously created job. No further updates to the job should be sent.
Returns the job.
Given a previously created job, updates the message for the job.
This will cause the job’s line in the dashboard to update, and will briefly be highlighted.
Returns the job.
Creates a new job using the local server.
Returns a job tuple that may be passed to the other functions.
Creates a new job using a remote server, from the node
parameter.
Pauses the dashboard.
The dashboard will clear itself when paused. Console output can then be written.
Returns :ok, after the dashboard is cleared.
To restore normal behavior to the dashboard, invoke resume/0
.
Pauses the dashboard on the indicated node.
Sets the prefix for the job; this immediately precedes the message. Generally, the prefix provides a job with a title.
There is no seperator between the prefix and the message, a prefix typically ends with “: “ or “- “.
Returns the job.
Resumes the dashboard after a pause/0
.
Resumes the dashboard after a pause/1
.
Updates the status of the job.
status
should be :normal
, :ok
, or :error
.
Returns the job.