...
A pico can have as many inbound channels as it needs. See pico-engine NEXT Managing Channels for more information. A pico can only create and delete channels for itself.
...
For example, this KRL code creates a channel when the app_section_collection
ruleset is installed into a pico (see the pico-engine NEXT Pico to Pico Subscriptions Lesson for context):
Code Block |
---|
ruleset app_section_collection { ... global { ... tags = ["app_section_collection"] eventPolicy = { "allow": [ { "domain": "section", "name": "*" }, ], "deny": [] } queryPolicy = { "allow": [ { "rid": meta:rid, "name": "*" } ], "deny": [] } } rule initialize_section_collection_pico { select when wrangler ruleset_installed where event:attr("rids") >< meta:rid if ent:section_collection_pico_eci.isnull() then wrangler:createChannel(tags,eventPolicy,queryPolicy) setting(channel) fired { ent:section_collection_pico_eci := channel{"id"} ent:sections := {} } } ... } |
...
For example, wrangler:rulesetMeta(“hello_world”)
(which refers to the ruleset shown in the pico-engine NEXT Pico Engine Quickstart page), would return this map:
...
Parameter | Datatype | Description |
---|---|---|
| String | The ECI to send the query to |
| String | The RID of the ruleset to send the query to |
| String | The name of the function to query |
params | Map | The parameters to be passed to the function on the target pico. Given as a map with parameter name as the key and argument as the value. |
_host | String | The host of the pico engine being queried. |
_path | String | The sub path of the url which does not include mod or func. |
_root_url | String | The entire URL except eci, mod , func. |
...