Module cloudi_trans_id

CloudI Transaction ID Usage

Convenience functions for using the v1 UUID used as the transaction id ("TransId" or "trans_id") that follows a CloudI service request for the lifetime (defined by the service request timeout) of the request and its response result.

Copyright © 2015-2016 Michael Truog

Version: 1.5.2 Sep 14 2016 16:25:22 ------------------------------------------------------------------------

Authors: Michael Truog (mjtruog [at] gmail (dot) com).

Description

CloudI Transaction ID Usage

Convenience functions for using the v1 UUID used as the transaction id ("TransId" or "trans_id") that follows a CloudI service request for the lifetime (defined by the service request timeout) of the request and its response result.

Function Index

datetime/1

Provide an ISO8601 datetime in UTC based on the time stored in the transaction id.

.
datetime/2

Provide an ISO8601 datetime in UTC based on the time stored in the transaction id with an offset in microseconds.

.
from_string/1

Return a transaction id as a binary UUID (16 bytes).

.
increment/1

Increment the transaction id while preserving uniqueness.

Increment the v1 UUID's clock_seq (14bit) integer for 16384 possible v1 UUID values based on a single transaction id.
microseconds/1

Microseconds since the UNIX epoch.

The integer value returned is always increasing for each service process that created the TransId (with the service process uniquely represented in the node_id section of the v1 UUID).
to_string/1

Return the transaction id in a standard string format.

.
to_string/2

Return the transaction id in a string format.

.

Function Details

datetime/1

datetime(TransId::uuid:uuid()) -> string()

Provide an ISO8601 datetime in UTC based on the time stored in the transaction id.

datetime/2

datetime(TransId::uuid:uuid(), MicroSecondsOffset::integer()) -> string()

Provide an ISO8601 datetime in UTC based on the time stored in the transaction id with an offset in microseconds.

from_string/1

from_string(String::string() | binary()) -> uuid:uuid()

Return a transaction id as a binary UUID (16 bytes).

increment/1

increment(TransId::uuid:uuid()) -> uuid:uuid()

Increment the transaction id while preserving uniqueness.

Increment the v1 UUID's clock_seq (14bit) integer for 16384 possible v1 UUID values based on a single transaction id.

microseconds/1

microseconds(TransId::uuid:uuid()) -> non_neg_integer()

Microseconds since the UNIX epoch.

The integer value returned is always increasing for each service process that created the TransId (with the service process uniquely represented in the node_id section of the v1 UUID). (The UNIX epoch is 1970-01-01T00:00:00)

to_string/1

to_string(TransId::uuid:uuid()) -> string()

Return the transaction id in a standard string format.

to_string/2

to_string(TransId::uuid:uuid(), Format::standard | nodash | list_standard | list_nodash | binary_standard | binary_nodash) -> string() | binary()

Return the transaction id in a string format.


Generated by EDoc, Sep 14 2016, 16:25:22.