mcl_core_lan_members (mcl_core v1.0.0)
View SourceThe cluster's member list, lan_members in the LAN data dir (docs/DESIGN.md §4.2, mcl-core#4): the keys that may take a token at the LAN entry point.
One member per line: the node id as 64 hex characters, a space, and the role, owner or member. A blank line, a # comment or a line of any other shape names nobody. The install step that copies the cookie and the gossip secret writes it on every node; removing a line removes the member.
Read again on EVERY question, so a member taken off the list is refused at its next request, whatever token it holds. Fails closed: a missing or unreadable file, or one that others than its owner may write (whoever writes it grants access), names nobody.
Summary
Functions
Where the list lives in the LAN data dir Dir.
The members a list's contents name, node id to role.
NodeId's role on the list in Dir, read now, or none.
Functions
-spec file(file:filename_all()) -> file:filename_all().
Where the list lives in the LAN data dir Dir.
-spec parse(binary()) -> #{<<_:256>> => mcl_core_lan_token:role()}.
The members a list's contents name, node id to role.
-spec role(file:filename_all(), term()) -> {ok, mcl_core_lan_token:role()} | none.
NodeId's role on the list in Dir, read now, or none.