Current section
Files
Jump to
Current section
Files
src/themis.erl
-module(themis).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([init/0, print/0]).
-export_type([themis_error/0]).
-type themis_error() :: {gauge_error, themis@gauge:gauge_error()} |
{histogram_error, themis@histogram:histogram_error()} |
{counter_error, themis@counter:counter_error()}.
-file("/git/Themis/src/themis.gleam", 14).
-spec init() -> gleam@erlang@atom:atom_().
init() ->
themis@internal@store:init().
-file("/git/Themis/src/themis.gleam", 29).
-spec print() -> {ok, binary()} | {error, themis_error()}.
print() ->
gleam@result:'try'(
begin
_pipe = themis@gauge:print(),
gleam@result:map_error(_pipe, fun(E) -> {gauge_error, E} end)
end,
fun(Gauges_print) ->
gleam@result:'try'(
begin
_pipe@1 = themis@counter:print(),
gleam@result:map_error(
_pipe@1,
fun(E@1) -> {counter_error, E@1} end
)
end,
fun(Counters_print) ->
gleam@result:'try'(
begin
_pipe@2 = themis@histogram:print(),
gleam@result:map_error(
_pipe@2,
fun(E@2) -> {histogram_error, E@2} end
)
end,
fun(Histograms_print) ->
_pipe@3 = (<<<<<<<<Gauges_print/binary, "\n"/utf8>>/binary,
Counters_print/binary>>/binary,
"\n"/utf8>>/binary,
Histograms_print/binary>>),
{ok, _pipe@3}
end
)
end
)
end
).