Bedrock.SystemKeys.OtpRef (bedrock v0.5.3)
View SourceFlatBuffer schema for OtpRef - service identity.
Used for all services (ephemeral and durable). Durable service IDs (like log_id) are encoded in the key path, not in this value.
Example
# Encode
binary = OtpRef.to_binary(%{otp_name: "bedrock_sequencer", node: "node@host"})
# Decode
{:ok, %{otp_name: name, node: node}} = OtpRef.read(binary)
# Convert to/from Elixir tuple format
ref = OtpRef.to_tuple(binary) # {:bedrock_sequencer, :"node@host"}
binary = OtpRef.from_tuple({:bedrock_sequencer, :"node@host"})
Summary
Types
Functions
Converts an Elixir tuple to binary OtpRef
Converts a binary OtpRef to Elixir tuple format