macula_bootstrap_registry (macula v0.20.5)

View Source

Bootstrap Registry - Thin wrapper around macula_routing_server DHT.

Delegates all storage/lookup operations to the DHT routing server. Bootstrap nodes use the DHT's built-in key-value storage for: 1. RPC Services - Advertised RPC endpoints 2. Pub/Sub Topics - Topic subscriptions

The DHT routing_server handles storage, TTL, and cleanup internally.

Summary

Functions

Generic delete (delegates to DHT)

Generic lookup (delegates to DHT)

Lookup RPC service by key (delegates to DHT)

Lookup subscribers for a topic (delegates to DHT)

Generic store (delegates to DHT)

Store RPC service registration (delegates to DHT)

Store pub/sub topic subscription (delegates to DHT)

Functions

code_change(OldVsn, State, Extra)

delete(Key)

-spec delete(Key :: binary()) -> ok | {error, not_found}.

Generic delete (delegates to DHT)

handle_call(Request, From, State)

handle_cast(Msg, State)

handle_info(Info, State)

init(Config)

lookup(Key)

-spec lookup(Key :: binary()) -> {ok, term()} | {error, not_found}.

Generic lookup (delegates to DHT)

lookup_service(Key)

-spec lookup_service(Key :: binary()) -> {ok, term()} | {error, not_found}.

Lookup RPC service by key (delegates to DHT)

lookup_topic(Topic)

-spec lookup_topic(Topic :: binary()) -> {ok, [map()]} | {error, not_found}.

Lookup subscribers for a topic (delegates to DHT)

start_link(Config)

-spec start_link(Config :: map()) -> {ok, pid()} | {error, term()}.

store(Key, Value)

-spec store(Key :: binary(), Value :: term()) -> ok.

Generic store (delegates to DHT)

store_service(Key, Value)

-spec store_service(Key :: binary(), Value :: term()) -> ok.

Store RPC service registration (delegates to DHT)

store_topic(Topic, Subscriber)

-spec store_topic(Topic :: binary(), Subscriber :: map()) -> ok.

Store pub/sub topic subscription (delegates to DHT)

terminate(Reason, State)