Vessel v0.8.0 Vessel.IO

This module contians a collection of utility functions designed to deal with Job IO, whether it be incoming or outgoing IO.

Currently only functions to write to the Context streams are exposed, along with utility functions for splitting inputs when sorting.

This module will likely grow in future, but an end-user should basically never have to call anything in this module directly - it’s purely for internal use (and as such, be aware that any function may be removed/modified at any time).

Summary

Functions

Splits a binary pair into a two-element Tuple

Writes a message out to a contextual error stream

Writes a message out to a contextual output stream

Functions

split(val, sep, cnt)
split(binary, binary, integer) :: {binary, binary}

Splits a binary pair into a two-element Tuple.

A binary pair is a line of input, with a tab character separating the key and value. We trim the trailing newline, and split on the first (and only first) tab character, before returning the generated List.

stderr(map, msg)
stderr(Vessel.t, binary) :: :ok

Writes a message out to a contextual error stream.

We write using the IO protocol to the process defined in the :stderr key of the Vessel context.

stdout(map, msg)
stdout(Vessel.t, binary) :: :ok

Writes a message out to a contextual output stream.

We write using the IO protocol to the process defined in the :stdout key of the Vessel context.