-module(distribute). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/distribute.gleam"). -export([version/0, start/2, connect/1, nodes/0, self_node/0, ping/1, new_subject/2, start_actor/3, send/2, 'receive'/2, register/2, lookup/1, unregister/1, subscribe/1, unsubscribe/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(" Facade for common distributed operations.\n"). -file("src/distribute.gleam", 13). -spec version() -> binary(). version() -> <<"3.1.0"/utf8>>. -file("src/distribute.gleam", 19). -spec start(binary(), binary()) -> {ok, nil} | {error, distribute@cluster:start_error()}. start(Name, Cookie) -> distribute@cluster:start_node(Name, Cookie). -file("src/distribute.gleam", 23). -spec connect(binary()) -> {ok, nil} | {error, distribute@cluster:connect_error()}. connect(Node) -> distribute@cluster:connect(Node). -file("src/distribute.gleam", 27). -spec nodes() -> list(binary()). nodes() -> distribute@cluster:nodes(). -file("src/distribute.gleam", 31). -spec self_node() -> binary(). self_node() -> distribute@cluster:self_node(). -file("src/distribute.gleam", 35). -spec ping(binary()) -> boolean(). ping(Node) -> distribute@cluster:ping(Node). -file("src/distribute.gleam", 41). -spec new_subject( fun((HAL) -> {ok, bitstring()} | {error, distribute@codec:encode_error()}), fun((bitstring()) -> {ok, HAL} | {error, distribute@codec:decode_error()}) ) -> distribute@global:global_subject(HAL). new_subject(Encoder, Decoder) -> distribute@global:new(Encoder, Decoder). -file("src/distribute.gleam", 48). -spec start_actor( distribute@registry:typed_name(HAP), HAR, fun((HAP, HAR) -> distribute@receiver:next(HAR)) ) -> {ok, distribute@global:global_subject(HAP)} | {error, gleam@otp@actor:start_error()}. start_actor(Typed_name, Initial_state, Handler) -> distribute@actor:start(Typed_name, Initial_state, Handler). -file("src/distribute.gleam", 56). -spec send(distribute@global:global_subject(HAW), HAW) -> {ok, nil} | {error, distribute@codec:encode_error()}. send(Subject, Message) -> distribute@global:send(Subject, Message). -file("src/distribute.gleam", 63). -spec 'receive'(distribute@global:global_subject(HBA), integer()) -> {ok, HBA} | {error, distribute@codec:decode_error()}. 'receive'(Subject, Timeout_ms) -> distribute@global:'receive'(Subject, Timeout_ms). -file("src/distribute.gleam", 72). -spec register( distribute@registry:typed_name(HBE), distribute@global:global_subject(HBE) ) -> {ok, nil} | {error, distribute@registry:register_error()}. register(Typed_name, Subject) -> distribute@registry:register_global(Typed_name, Subject). -file("src/distribute.gleam", 79). -spec lookup(distribute@registry:typed_name(HBJ)) -> {ok, distribute@global:global_subject(HBJ)} | {error, nil}. lookup(Typed_name) -> distribute@registry:lookup(Typed_name). -file("src/distribute.gleam", 85). -spec unregister(binary()) -> {ok, nil} | {error, distribute@registry:register_error()}. unregister(Name) -> distribute@registry:unregister(Name). -file("src/distribute.gleam", 91). -spec subscribe( gleam@erlang@process:subject(distribute@cluster@monitor:cluster_event()) ) -> {ok, gleam@erlang@process:subject(distribute@cluster@monitor:control_message())} | {error, gleam@otp@actor:start_error()}. subscribe(User_subject) -> distribute@cluster@monitor:subscribe(User_subject). -file("src/distribute.gleam", 97). -spec unsubscribe( gleam@erlang@process:subject(distribute@cluster@monitor:control_message()) ) -> nil. unsubscribe(Monitor_subject) -> distribute@cluster@monitor:unsubscribe(Monitor_subject).