Struct juju::Context
[−]
[src]
pub struct Context {
pub relation_type: String,
pub relation_id: usize,
pub unit: String,
pub relations: HashMap<String, String>,
}Fields
relation_type: String
The scope for the current relation hook
relation_id: usize
The relation ID for the current relation hook
unit: String
Local unit ID
relations: HashMap<String, String>
relation data for all related units
Methods
impl Context[src]
fn new_from_env() -> Context
Constructs a new Context
Creates a context that's filled out from the env variables
Example usage
extern crate juju; let context = juju::Context::new_from_env();