userver: samples/s3api/src/s3api_client.hpp
Loading...
Searching...
No Matches
samples/s3api/src/s3api_client.hpp
// Note: this is for the purposes of tests/samples only
namespace samples {
// This component is not required to create S3 api client. It is used for demonstation
// purposes only.
class S3ApiSampleComponent : public components::LoggableComponentBase {
public:
// `kName` is used as the component name in static config
static constexpr std::string_view kName = "s3-sample-component";
S3ApiSampleComponent(const components::ComponentConfig& config, const components::ComponentContext& context);
s3api::ClientPtr GetClient();
private:
// http_client MUST outlive any dependent s3 client
clients::http::Client& http_client_;
};
void DoVeryImportantThingsInS3(s3api::ClientPtr client);
} // namespace samples