embryo
- Library for managing Emergence configuration and embryo objects.
Copyright © 2025 YourCompany
Version: 0.1.0
Authors: YourName.
embryo
- Library for managing Emergence configuration and embryo objects
config_map() = map()
embryo() = #embryo{}
properties() = map()
get_em_disco_url/0 | Gets the Emergence discovery service URL. |
merge_lists_by_url/2 | Merges two lists of embryos, removing duplicates based on URL. |
new/1 | Creates a new embryo object with the given properties. |
read_emergence_conf/0 | Reads the Emergence configuration file. |
to_map/1 | Converts an embryo record to a map representation. |
get_em_disco_url() -> string()
returns: The discovery service URL as a string
Gets the Emergence discovery service URL.
Tries to get the URL from: 1. Environment variable "server_url" 2. "em_disco/server_url" in the configuration file 3. Falls back to "http://localhost:8080" if not foundmerge_lists_by_url(UriList::[embryo()], OtherList::[embryo()]) -> [embryo()]
UriList
: First list of embryo records
OtherList
: Second list of embryo records
returns: A merged list with duplicates removed
Merges two lists of embryos, removing duplicates based on URL.
new(Properties::properties()) -> embryo()
Properties
: A map of properties for the embryo
returns: A new embryo record
Creates a new embryo object with the given properties.
read_emergence_conf() -> config_map() | undefined
returns: Configuration map or 'undefined' if the file doesn't exist
Reads the Emergence configuration file.
Looks for emergence.conf in platform-specific locations: - Unix: ~/.config/emergence/emergence.conf - Windows: %APPDATA%\emergence\emergence.conf or %HOME%\AppData\Roaming\emergence\emergence.confto_map(Embryo::embryo()) -> map()
Embryo
: The embryo record to convert
returns: A map representation of the embryo
Converts an embryo record to a map representation.
Generated by EDoc