Search documentation of macula

# macula_bootstrap_registry (macula v0.44.2)

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

code_change(OldVsn, State, Extra)
delete(Key)

Generic delete (delegates to DHT)

handle_call(Request, From, State)
handle_cast(Msg, State)
handle_info(Info, State)
init(Config)
lookup(Key)

Generic lookup (delegates to DHT)

lookup_service(Key)

Lookup RPC service by key (delegates to DHT)

lookup_topic(Topic)

Lookup subscribers for a topic (delegates to DHT)

start_link(Config)
store(Key, Value)

Generic store (delegates to DHT)

store_service(Key, Value)

Store RPC service registration (delegates to DHT)

store_topic(Topic, Subscriber)

Store pub/sub topic subscription (delegates to DHT)

terminate(Reason, State)

# 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)