PacketFlow.Registry.Discovery (packetflow v0.1.0)
Component discovery and lookup mechanisms
This module provides sophisticated component discovery capabilities including:
- Component pattern matching
- Component capability matching
- Component version matching
- Component health filtering
- Component load balancing
Summary
Functions
Returns a specification to start this module under a supervisor.
Find components by capability requirements
Find components by type
Find components matching a pattern
Find healthy components only
Get best component match using load balancing
Get component health with caching
Get component metadata
Callback implementation for GenServer.init/1
.
Refresh health cache for all components
Register a component for discovery
Unregister a component from discovery
Update component metadata
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec find_by_capabilities([term()]) :: [component_match()]
Find components by capability requirements
@spec find_by_type(atom()) :: [component_match()]
Find components by type
@spec find_components(discovery_pattern()) :: [component_match()]
Find components matching a pattern
@spec find_healthy_components(discovery_pattern()) :: [component_match()]
Find healthy components only
@spec get_best_match(discovery_pattern(), atom()) :: component_match() | nil
Get best component match using load balancing
@spec get_component_health(atom()) :: :healthy | :unhealthy | :degraded | :unknown
Get component health with caching
Get component metadata
Callback implementation for GenServer.init/1
.
@spec refresh_health_cache() :: :ok
Refresh health cache for all components
Register a component for discovery
@spec unregister_component(atom()) :: :ok
Unregister a component from discovery
Update component metadata