Current section

Files

Jump to
themis src themis.erl
Raw

src/themis.erl

-module(themis).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([init/0, print/1]).
-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() -> themis@internal@store:store().
init() ->
themis@internal@store:init().
-file("/git/Themis/src/themis.gleam", 29).
-spec print(themis@internal@store:store()) -> {ok, binary()} |
{error, themis_error()}.
print(Store) ->
gleam@result:'try'(
begin
_pipe = themis@gauge:print(Store),
gleam@result:map_error(_pipe, fun(E) -> {gauge_error, E} end)
end,
fun(Gauges_print) ->
gleam@result:'try'(
begin
_pipe@1 = themis@counter:print(Store),
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(Store),
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
).