MCPcopy Create free account
hub / github.com/activeloopai/deeplake / get_credentials

Method get_credentials

cpp/deeplake_pg/table_storage.cpp:141–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139char* session_credentials::root_path_guc_string = nullptr;
140
141icm::string_map<> session_credentials::get_credentials()
142{
143 icm::string_map<> creds_map;
144
145 if (creds_guc_string != nullptr && std::strlen(creds_guc_string) > 0) {
146 try {
147 auto creds_json = icm::json::parse(creds_guc_string);
148 for (auto it = creds_json.begin(); it != creds_json.end(); ++it) {
149 std::string key_str(it.key());
150 if (it.value().is_string()) {
151 creds_map[key_str] = it.value().get<std::string>();
152 } else {
153 elog(WARNING, "Credential value for key '%s' is not a string, skipping", key_str.c_str());
154 }
155 }
156 } catch (const std::exception& e) {
157 elog(WARNING, "Failed to parse deeplake.creds: %s. Using environment variables.", e.what());
158 }
159 }
160
161 return creds_map;
162}
163
164std::string session_credentials::get_root_path()
165{

Callers

nothing calls this directly

Calls 6

keyMethod · 0.80
whatMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
is_stringMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected