-module(aion@internal@pump). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/aion/internal/pump.gleam"). -export([run/1, shield/1]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. ?MODULEDOC(false). -file("src/aion/internal/pump.gleam", 50). ?DOC(false). -spec run(fun(() -> {ok, binary()} | {error, binary()})) -> {ok, binary()} | {error, binary()}. run(Do) -> case Do() of {error, <<"aion_query:"/utf8, Sentinel_payload/binary>>} -> aion_flow_query_pump:service(Sentinel_payload), run(Do); Outcome -> Outcome end. -file("src/aion/internal/pump.gleam", 70). ?DOC(false). -spec shield({ok, binary()} | {error, binary()}) -> {ok, binary()} | {error, binary()}. shield(Outcome) -> case Outcome of {ok, Value} -> {ok, Value}; {error, Reason} -> {error, Reason} end.