macula_dist_mdns_advertiser (macula v0.14.3)
View SourceMacula Distribution mDNS Advertiser.
This module implements the mdns advertiser behaviour from the shortishly/mdns library. It advertises Macula distribution nodes via mDNS for automatic discovery on local networks.
Usage: %% Start advertising mdns_advertise_sup:start_child(macula_dist_mdns_advertiser).
%% Stop advertising mdns_advertise:stop(macula_dist_mdns_advertiser).
Summary
Functions
Return the list of service instances to advertise. Each instance is a map with: - instance: Full instance name - priority: SRV record priority (lower = preferred) - weight: SRV record weight for load balancing - port: The port the service is running on - hostname: The hostname without domain - properties: TXT record key-value pairs
Register this node for mDNS advertisement.
Return the mDNS service type. This follows the standard format: _service._protocol.local.
Unregister this node from mDNS advertisement.
Functions
-spec instances() -> [map()].
Return the list of service instances to advertise. Each instance is a map with: - instance: Full instance name - priority: SRV record priority (lower = preferred) - weight: SRV record weight for load balancing - port: The port the service is running on - hostname: The hostname without domain - properties: TXT record key-value pairs
-spec register(atom() | string(), pos_integer()) -> ok.
Register this node for mDNS advertisement.
-spec service() -> string().
Return the mDNS service type. This follows the standard format: _service._protocol.local.
-spec unregister() -> ok.
Unregister this node from mDNS advertisement.