PacketFlow.Substrate.Interface behaviour (packetflow v0.1.0)
Standard interfaces for PacketFlow substrates
This module defines the standard interfaces that all substrates must implement for proper communication, composition, and monitoring.
Summary
Callbacks
Substrate security interface
Substrate transaction interface
Substrate composition interface
Substrate backup interface
Substrate discovery interface
Substrate capability interface
Substrate debugging interface
Substrate dependency interface
Substrate monitoring interface
Substrate data flow interface
Substrate metrics interface
Substrate resource management interface
Substrate state management interface
Substrate time management interface
Substrate versioning interface
Substrate fault tolerance interface
Substrate initialization interface
Substrate integration interface
Substrate migration interface
Substrate optimization interface
Substrate scaling interface
Substrate communication interface
Substrate serialization interface
Substrate lifecycle interface
Substrate event interface
Substrate notification interface
Substrate configuration interface
Substrate validation interface
Functions
Substrate validation helpers
Callbacks
@callback authenticate(credentials :: map()) :: {:ok, permissions :: [atom()]} | {:error, reason :: any()}
Substrate security interface
Substrate transaction interface
@callback clear_failure_history() :: :ok
@callback compose_with(other_substrate :: module(), config :: map()) :: {:ok, composed_module :: module()} | {:error, reason :: any()}
Substrate composition interface
Substrate backup interface
@callback discover_peers() :: [map()]
Substrate discovery interface
@callback get_capabilities() :: [atom()]
Substrate capability interface
@callback get_debug_info() :: map()
Substrate debugging interface
@callback get_dependencies() :: [module()]
Substrate dependency interface
@callback get_failure_history() :: [map()]
@callback get_health_status() :: map()
Substrate monitoring interface
@callback get_input_ports() :: [map()]
Substrate data flow interface
@callback get_logs() :: [String.t()]
@callback get_metrics() :: map()
Substrate metrics interface
@callback get_output_ports() :: [map()]
@callback get_performance_stats() :: map()
@callback get_resource_limits() :: map()
@callback get_resource_usage() :: map()
Substrate resource management interface
@callback get_scaling_recommendations() :: [map()]
@callback get_state() :: map()
Substrate state management interface
@callback get_time_constraints() :: [map()]
Substrate time management interface
@callback get_version() :: String.t()
Substrate versioning interface
Substrate fault tolerance interface
Substrate initialization interface
@callback integrate_with(external_system :: atom(), config :: map()) :: {:ok, integration_id :: atom()} | {:error, reason :: any()}
Substrate integration interface
@callback is_within_time_constraints() :: boolean()
Substrate migration interface
Substrate optimization interface
@callback reset_state() :: :ok | {:error, reason :: any()}
@callback restart_substrate() :: :ok | {:error, reason :: any()}
Substrate scaling interface
@callback send_message(message :: any(), target :: any()) :: {:ok, response :: any()} | {:error, reason :: any()}
Substrate communication interface
@callback serialize_state() :: binary()
Substrate serialization interface
@callback set_debug_level(level :: atom()) :: :ok
@callback start_substrate() :: :ok | {:error, reason :: any()}
Substrate lifecycle interface
@callback stop_substrate() :: :ok | {:error, reason :: any()}
Substrate event interface
@callback subscribe_to_notifications(pid :: pid(), notification_types :: [atom()]) :: :ok | {:error, reason :: any()}
Substrate notification interface
Substrate configuration interface
@callback validate_config(config :: map()) :: {:ok, validated_config :: map()} | {:error, reason :: any()}
Substrate validation interface