View Source erldist_filter_nif (erldist_filter v1.28.5)
Summary
Types
-type action() :: action_emit() | action_log().
-type action_emit() :: {emit, binary()}.
-type action_log() :: {log, non_neg_integer(), {logger_time(), logger_event()}}.
-type channel() :: erlang:nif_resource().
-type channel_inspection() :: #{controlling_process := pid(), entry := #{connection_id := connection_id(), creation := creation(), dflags := distribution_flags(), sysname := sysname()}, rx := #{atom_cache := [{0..2047, atom()}], ioq_size := non_neg_integer(), packet_size := non_neg_integer(), stats := erldist_filter_nif_types:channel_stats(), vec_capacity := non_neg_integer(), vec_len := non_neg_integer()}, tracing_process := undefined | pid()}.
-type connection_id() :: 0..4294967295.
-type creation() :: 0..4294967295.
-type distribution_flags() :: 0..18446744073709551615.
-type logger() :: erlang:nif_resource().
-type logger_event() :: {sysname(), logger_event_atoms(), logger_event_control(), logger_event_payload()}.
-type logger_event_control() :: undefined | binary().
-type logger_event_payload() :: undefined | binary().
-type logger_inspection() :: #{controlling_process := pid(), dropped := non_neg_integer(), received := non_neg_integer()}.
-type logger_select_handle() :: reference().
-type logger_time() :: integer().
-type packet_size() :: 0 | 1 | 2 | 4 | 8.
-type router_info() :: #{count := pos_integer(), limit := pos_integer(), names := [atom()]}.
-type sysname() :: node().
-type world_stat_group_channel() :: #{create := non_neg_integer(), destroy := non_neg_integer(), rx_stats := erldist_filter_nif_types:channel_stats()}.
-type world_stat_group_memory() :: #{vec_own_bin_create := non_neg_integer(), vec_own_bin_create_capacity := non_neg_integer(), vec_own_bin_realloc := non_neg_integer(), vec_own_bin_realloc_capacity := non_neg_integer(), vec_own_bin_destroy := non_neg_integer(), vec_own_mem_create := non_neg_integer(), vec_own_mem_create_capacity := non_neg_integer(), vec_own_mem_realloc := non_neg_integer(), vec_own_mem_realloc_capacity := non_neg_integer(), vec_own_mem_destroy := non_neg_integer(), vec_ref_bin_create := non_neg_integer(), vec_ref_bin_destroy := non_neg_integer(), vec_ref_ioq_create := non_neg_integer(), vec_ref_ioq_destroy := non_neg_integer()}.
-type world_stats() :: #{channel := world_stat_group_channel(), memory := world_stat_group_memory(), slots := non_neg_integer()}.
Functions
-spec altact_sig_flags() -> erldist_filter_nif_types:altact_sig_flags().
-spec channel_close(Channel :: channel()) -> ok | {error, closed | not_owner}.
-spec channel_inspect(Channel :: channel()) -> channel_inspection().
-spec channel_list() -> [channel()].
Link to this function
channel_open(PacketSize, Sysname, Creation, ConnectionId, DistributionFlags)
View Source-spec channel_open(PacketSize, Sysname, Creation, ConnectionId, DistributionFlags) -> Channel when PacketSize :: packet_size(), Sysname :: sysname(), Creation :: creation(), ConnectionId :: connection_id(), DistributionFlags :: distribution_flags(), Channel :: channel().
-spec channel_recv(Channel :: channel(), Input :: binary() | erlang:iovec()) -> [action()].
-spec config_get() -> ConfigMap when ConfigMap :: erldist_filter_nif_types:config_map().
-spec config_get(ConfigKey) -> ConfigVal when ConfigKey :: erldist_filter_nif_types:config_key(), ConfigVal :: boolean().
-spec config_set(ConfigMapSet) -> ok when ConfigMapSet :: erldist_filter_nif_types:config_map_set().
-spec config_set(ConfigKey, ConfigVal) -> ok when ConfigKey :: erldist_filter_nif_types:config_key(), ConfigVal :: boolean().
-spec dist_ext_to_term(AtomsTuple, InputBinary) -> Term when AtomsTuple :: logger_event_atoms(), InputBinary :: binary(), Term :: dynamic().
-spec dist_ext_to_vdist(AtomsTuple, InputBinary) -> VDist when AtomsTuple :: logger_event_atoms(), InputBinary :: binary(), VDist :: vdist:dop_t().
-spec dist_ext_to_vterm(AtomsTuple, InputBinary) -> VTerm when AtomsTuple :: logger_event_atoms(), InputBinary :: binary(), VTerm :: vterm:t().
-spec dist_ext_to_vterm(AtomsTuple, InputBinary, Limit) -> VTerm when AtomsTuple :: logger_event_atoms(), InputBinary :: binary(), Limit :: integer(), VTerm :: vterm:t().
-spec dist_int_to_vdist(AtomsTuple, InputBinary) -> VDist when AtomsTuple :: logger_event_atoms(), InputBinary :: binary(), VDist :: vdist:dop_t().
-spec dist_int_to_vterm(AtomsTuple, InputBinary) -> VTerm when AtomsTuple :: logger_event_atoms(), InputBinary :: binary(), VTerm :: vterm:t().
-spec dist_int_to_vterm(AtomsTuple, InputBinary, Limit) -> VTerm when AtomsTuple :: logger_event_atoms(), InputBinary :: binary(), Limit :: integer(), VTerm :: vterm:t().
-spec distribution_flags() -> erldist_filter_nif_types:distribution_flags().
-spec logger_close(Logger) -> ok | {error, Reason} when Logger :: logger(), Reason :: closed | not_owner.
-spec logger_inspect(Logger) -> logger_inspection() | {error, Reason} when Logger :: logger(), Reason :: closed.
-spec logger_list() -> [logger()].
-spec logger_open() -> Logger when Logger :: logger().
-spec logger_recv(Logger) -> Select | Batch | {error, Reason} when Logger :: logger(), Select :: {select, logger_select_handle()}, Batch :: {Size, Drop, [Element]}, Size :: non_neg_integer(), Drop :: non_neg_integer(), Element :: {Time, Event}, Time :: logger_time(), Event :: logger_event(), Reason :: closed | not_owner.
-spec logger_set_capacity(NewCapacity) -> OldCapacity when NewCapacity :: non_neg_integer(), OldCapacity :: non_neg_integer().
-spec otp_name_blocklist() -> BlockList when BlockList :: [atom()].
-spec router_info() -> RouterInfo when RouterInfo :: router_info().
-spec spawn_flags() -> erldist_filter_nif_types:spawn_flags().
-spec version() -> non_neg_integer().
-spec world_stats_get() -> world_stats().