MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / extractConfigValues

Function extractConfigValues

programs/docker-init/docker-init.cpp:257–266  ·  view source on GitHub ↗

Extract multiple values from a ClickHouse config key (wildcard patterns return multiple lines).

Source from the content-addressed store, hash-verified

255
256/// Extract multiple values from a ClickHouse config key (wildcard patterns return multiple lines).
257std::vector<std::string> extractConfigValues(const std::string & config_file, const std::string & key)
258{
259 auto [code, lines] = captureCommand({
260 g_clickhouse_binary, "extract-from-config",
261 "--config-file", config_file,
262 "--key", key,
263 "--try",
264 });
265 return (code == 0) ? std::move(lines) : std::vector<std::string>{};
266}
267
268/// Recursively chown a path. Logs warnings but does not abort on failure.
269void recursiveChown(const std::string & path_str, uid_t uid, gid_t gid)

Callers 1

Calls 1

captureCommandFunction · 0.85

Tested by

no test coverage detected