macula_content_system (macula v0.20.5)
View SourceSupervisor for Macula content-addressed storage system.
Manages the lifecycle of content system child processes: - macula_content_store: Local block and manifest storage - macula_content_transfer: Want/have/block exchange protocol
Supervision Strategy
Uses one_for_one strategy - if a child dies, only that child is restarted. This is appropriate because: - Store and Transfer can operate independently - Store failure shouldn't affect in-flight transfers - Transfer failure shouldn't corrupt storage
Integration
Add to macula_root.erl supervision tree:
#{id => macula_content_system,
start => {macula_content_system, start_link, [#{}]},
type => supervisor}
Summary
Functions
Get child specifications for external inspection/testing.
Start the content system supervisor. Options: - store_path: Base directory for block storage - node_id: This node's identifier for transfer protocol
Get the supervision strategy.
Functions
-spec child_specs(map()) -> [supervisor:child_spec()].
Get child specifications for external inspection/testing.
Start the content system supervisor. Options: - store_path: Base directory for block storage - node_id: This node's identifier for transfer protocol
-spec strategy() -> {ok, supervisor:strategy()}.
Get the supervision strategy.