[Patch v5 05/11] lib: provide config API