ConfigServer+LibConfig: Add pledge_domains() API

This API lets applications specify which configuration domains they
will be accessing throughout their lifetime. It works similarly in
spirit to the kernel's pledge().

You cannot pledge_domains() more than once, and once you have used it,
it's no longer possible to access any other configuration domain.

This is obviously just a first cut of this mechanism, and we may need
to tweak it further as we go.
This commit is contained in:
Andreas Kling 2021-08-25 20:02:10 +02:00
commit eeddaa988a
Notes: sideshowbarker 2024-07-18 05:17:07 +09:00
5 changed files with 64 additions and 0 deletions

View file

@ -1,5 +1,7 @@
endpoint ConfigServer
{
pledge_domains(Vector<String> domains) =|
read_string_value(String domain, String group, String key) => (Optional<String> value)
read_i32_value(String domain, String group, String key) => (Optional<i32> value)
read_bool_value(String domain, String group, String key) => (Optional<bool> value)