pika_id/utils

Types

pub type Address {
  Hwaddr(List(Int))
  Flags
  Addr
  Netmask
  Broadaddr
}

Constructors

  • Hwaddr(List(Int))
  • Flags
  • Addr
  • Netmask
  • Broadaddr
pub type Interface =
  #(List(Int), List(Address))

Functions

pub fn compute_node_id() -> Int

Compute the Node ID for the Snowflake gen.

pub fn get_mac_address() -> String

Get the mac address of the first available public interface on the device.

pub fn get_timestamp() -> Int

Get timestamp in millisec.

pub fn getifaddrs() -> Result(
  List(#(List(Int), List(Address))),
  String,
)
pub fn is_alphanumeric_list(
  str_list: List(String),
) -> Result(String, Nil)
Search Document