userver
C++ Async Framework
Loading...
Searching...
No Matches
samples/s3api/src/s3api_client.hpp
#include <
userver/clients/http/component.hpp
>
#include <
userver/components/loggable_component_base.hpp
>
// Note: this is for the purposes of tests/samples only
#include <
userver/utest/using_namespace_userver.hpp
>
#include <
userver/s3api/clients/fwd.hpp
>
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
Generated on Wed Dec 4 2024 18:42:01 for userver by
Doxygen
1.10.0