|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
13 #include "opentelemetry/nostd/function_ref.h"
14 #include "opentelemetry/nostd/string_view.h"
15 #include "opentelemetry/version.h"
108 using Body = std::vector<Byte>;
112 bool operator()(
const std::string &s1,
const std::string &s2)
const
114 return std::lexicographical_compare(
115 s1.begin(), s1.end(), s2.begin(), s2.end(),
116 [](
char c1,
char c2) { return ::tolower(c1) < ::tolower(c2); });
119 using Headers = std::multimap<std::string, std::string, cmp_ic>;
126 bool input_ssl_insecure_skip_verify,
151 if (strncmp(url.
data(),
"https:", 6) == 0)
238 float input_backoff_multiplier)
266 virtual void SetTimeoutMs(std::chrono::milliseconds timeout_ms) noexcept = 0;
270 virtual void EnableLogging(
bool is_log_enabled) noexcept = 0;
305 ) const noexcept
override
312 ) const noexcept
override
325 : response_(
std::
move(res)), session_state_(session_state)
330 if (response_ ==
nullptr)
340 std::unique_ptr<Response> response_;
357 virtual std::shared_ptr<Request>
CreateRequest() noexcept = 0;
359 virtual void SendRequest(std::shared_ptr<EventHandler>) noexcept = 0;
392 return Get(url, no_ssl, headers, compression);
397 const Headers &headers = {{
"content-type",
"application/json"}},
401 return Post(url, no_ssl, body, headers, compression);
405 const HttpSslOptions &ssl_options,
410 const HttpSslOptions &ssl_options,
412 const Headers & = {{
"content-type",
"application/json"}},
virtual void SetTimeoutMs(std::chrono::milliseconds timeout_ms) noexcept=0
SecondsDecimal initial_backoff
std::chrono::duration< float, std::ratio< 1 > > SecondsDecimal
virtual bool FinishSession() noexcept=0
virtual ~HttpClient()=default
virtual void SetMethod(Method method) noexcept=0
virtual void SetRetryPolicy(const RetryPolicy &retry_policy) noexcept=0
std::string ssl_cipher_suite
TLS Cipher suite.
std::string ssl_client_cert_string
Client cert.
virtual void SendRequest(std::shared_ptr< EventHandler >) noexcept=0
virtual ~Response()=default
virtual ~HttpClientSync()=default
virtual void SetMaxSessionsPerConnection(std::size_t max_requests_per_connection) noexcept=0
bool ForEachHeader(nostd::function_ref< bool(nostd::string_view name, nostd::string_view value)>) const noexcept override
virtual Result Get(const nostd::string_view &url, const HttpSslOptions &ssl_options, const Headers &={{}}, const Compression &compression=Compression::kNone) noexcept=0
virtual void ReplaceHeader(nostd::string_view name, nostd::string_view value) noexcept=0
const Body & GetBody() const noexcept override
SessionState GetSessionState()
bool ForEachHeader(const nostd::string_view &, nostd::function_ref< bool(nostd::string_view name, nostd::string_view value)>) const noexcept override
virtual bool FinishAllSessions() noexcept=0
virtual void OnEvent(SessionState, nostd::string_view) noexcept=0
#define OPENTELEMETRY_BEGIN_NAMESPACE
std::string ssl_cipher
TLS Cipher.
virtual bool CancelAllSessions() noexcept=0
StatusCode GetStatusCode() const noexcept override
std::string ssl_min_tls
Minimum SSL version to use.
std::string ssl_ca_cert_string
CA CERT.
virtual StatusCode GetStatusCode() const noexcept=0
virtual void EnableLogging(bool is_log_enabled) noexcept=0
virtual void OnResponse(Response &) noexcept=0
HttpSslOptions(nostd::string_view url, bool input_ssl_insecure_skip_verify, nostd::string_view input_ssl_ca_cert_path, nostd::string_view input_ssl_ca_cert_string, nostd::string_view input_ssl_client_key_path, nostd::string_view input_ssl_client_key_string, nostd::string_view input_ssl_client_cert_path, nostd::string_view input_ssl_client_cert_string, nostd::string_view input_ssl_min_tls, nostd::string_view input_ssl_max_tls, nostd::string_view input_ssl_cipher, nostd::string_view input_ssl_cipher_suite)
std::string ssl_max_tls
Maximum SSL version to use.
#define OPENTELEMETRY_END_NAMESPACE
virtual Result Post(const nostd::string_view &url, const HttpSslOptions &ssl_options, const Body &body, const Headers &={{"content-type", "application/json"}}, const Compression &compression=Compression::kNone) noexcept=0
virtual void SetSslOptions(const HttpSslOptions &options) noexcept=0
constexpr absl::OTABSL_OPTION_NAMESPACE_NAME::remove_reference_t< T > && move(T &&t) noexcept
virtual void SetCompression(const Compression &compression) noexcept=0
virtual bool IsSessionActive() noexcept=0
virtual bool ForEachHeader(nostd::function_ref< bool(nostd::string_view name, nostd::string_view value)> callable) const noexcept=0
virtual bool CancelSession() noexcept=0
virtual Result PostNoSsl(const nostd::string_view &url, const Body &body, const Headers &headers={{"content-type", "application/json"}}, const Compression &compression=Compression::kNone) noexcept
bool operator()(const std::string &s1, const std::string &s2) const
SecondsDecimal max_backoff
std::string ssl_client_key_string
Client key.
std::string ssl_client_cert_path
Path to the client cert file.
std::multimap< std::string, std::string, cmp_ic > Headers
virtual std::shared_ptr< Request > CreateRequest() noexcept=0
RetryPolicy(std::uint32_t input_max_attempts, SecondsDecimal input_initial_backoff, SecondsDecimal input_max_backoff, float input_backoff_multiplier)
Result GetNoSsl(const nostd::string_view &url, const Headers &headers={{}}, const Compression &compression=Compression::kNone) noexcept
std::string ssl_client_key_path
Path to the client key file.
virtual std::shared_ptr< Session > CreateSession(nostd::string_view url) noexcept=0
Extensions to the C++ standard library.
virtual ~Session()=default
virtual ~Request()=default
const char * data() const noexcept
bool use_ssl
Use HTTPS (true) or HTTP (false).
virtual void AddHeader(nostd::string_view name, nostd::string_view value) noexcept=0
std::string ssl_ca_cert_path
Path to the CA CERT file.
virtual void SetBody(Body &body) noexcept=0
virtual ~EventHandler()=default
bool ssl_insecure_skip_verify
Skip SSL/TLS verifications.
std::uint32_t max_attempts
virtual const Body & GetBody() const noexcept=0
Result(std::unique_ptr< Response > res, SessionState session_state)
virtual void SetUri(nostd::string_view uri) noexcept=0
Back port of std::string_view to work with pre-cpp-17 compilers.