pub struct Config { /* fields omitted */ }
Service configuration structure
Creates and parses configuration data. Service name is used
as a key in the config file.
Returns the configured hosturl string in the following
format (using IPv4 addresses) - 0.0.0.0:0000
Returns the service's configuration information
in the toml::Value
format.
This will contain the ip/port if provided, along with any other
configuration information found in the config file.
use kubos_service::Config;
let config = Config::new("example-service");
let raw = config.raw();
let bus = raw["bus"].as_str();
Performs a get on the raw config data
key
- Key of value to get from config
Formats the value using the given formatter. Read more
Returns the "default value" for a type. Read more