distribute/registry

Types

pub type Pid
pub type RegisterError {
  AlreadyRegistered
  InvalidProcess
  InvalidName(String)
  NetworkError(String)
  RegisterFailed(String)
}

Constructors

  • AlreadyRegistered

    Name is already registered by another process.

  • InvalidProcess

    Process is not alive or invalid.

  • InvalidName(String)

    Name contains invalid characters or is too long.

  • NetworkError(String)

    Network partition or connectivity issue.

  • RegisterFailed(String)

    Generic registration failure.

Values

pub fn register(
  name: String,
  pid: Pid,
) -> Result(Nil, RegisterError)

Register a process globally under the given name.

pub fn unregister(name: String) -> Result(Nil, RegisterError)

Unregister a globally registered name.

pub fn whereis(name: String) -> option.Option(Pid)

Look up a globally registered process by name. Returns Some(pid) if found, None otherwise.

Search Document