#pragma once #include #include #include #include #include #include #include #include #include #include namespace Poco::Util { class AbstractConfiguration; } namespace DB { struct Settings; struct S3Settings { S3::S3AuthSettings auth_settings; S3::S3RequestSettings request_settings; void loadFromConfig( const Poco::Util::AbstractConfiguration & config, const std::string & config_prefix, const DB::Settings & settings); void updateIfChanged(const S3Settings & settings); }; class S3SettingsByEndpoint { public: void loadFromConfig( const Poco::Util::AbstractConfiguration & config, const std::string & config_prefix, const DB::Settings & settings); std::optional getSettings( const std::string & endpoint, const std::string & user, bool ignore_user = false) const; private: mutable std::mutex mutex; std::map s3_settings; }; }