File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,38 @@ use std::{
10
10
process:: { self , Command , Stdio } ,
11
11
} ;
12
12
13
+ /// Mapping of plugin service names to their properties specified in
14
+ /// [plugin configuration](https://github.com/picodata/pike?tab=readme-ov-file#config-apply).
15
+ ///
16
+ /// ### Example:
17
+ ///
18
+ /// Assume plugin configuration YAML has the following content:
19
+ ///
20
+ /// **`plugin_config.yaml`:**
21
+ /// ```yaml
22
+ /// service_name:
23
+ /// http_server:
24
+ /// url: "www.example.com"
25
+ /// ```
26
+ /// Mapping for such config is supposed to look like:
27
+ ///
28
+ /// ```rust,no_run
29
+ /// let plugin_config = HashMap::from([(
30
+ /// // Name of the service
31
+ /// "service_name".to_string(),
32
+ ///
33
+ /// // Mapping of properties corresponding to the service
34
+ /// HashMap::from([(
35
+ /// "http_server".to_string(),
36
+ /// serde_yaml::to_value(HashMap::from([(
37
+ /// "url".to_string(),
38
+ /// // URL is overridden for testing.
39
+ /// "localhost:29092".to_string(),
40
+ /// )]))
41
+ /// .unwrap(),
42
+ /// )]),
43
+ /// )]);
44
+ /// ```
13
45
pub type ConfigMap = HashMap < String , HashMap < String , serde_yaml:: Value > > ;
14
46
15
47
const DEFAULT_PLUGIN_CONFIG_PATH : & str = "plugin_config.yaml" ;
You can’t perform that action at this time.
0 commit comments