userver: baggage::BaggageManager Class Reference
Loading...
Searching...
No Matches
baggage::BaggageManager Class Referencefinal

#include <userver/baggage/baggage_manager.hpp>

Detailed Description

Client for manipulation with Baggage header content.

Usually retrieved from baggage::BaggageManagerComponent.

Definition at line 23 of file baggage_manager.hpp.

Public Member Functions

 BaggageManager (const dynamic_config::Source &config_source)
 
bool IsEnabled () const
 Returns if baggage is enabled.
 
void AddEntry (std::string key, std::string value, BaggageProperties properties) const
 Add entry to baggage header.
 
void SetBaggage (std::string header) const
 Set new baggage value to task inherited variable.
 

Static Public Member Functions

static const BaggageTryGetBaggage ()
 Get const pointer to baggage value from task inherited variable.
 
static void ResetBaggage ()
 Delete header from task inherited variable.
 

Member Function Documentation

◆ AddEntry()

void baggage::BaggageManager::AddEntry ( std::string key,
std::string value,
BaggageProperties properties ) const

Add entry to baggage header.

Exceptions
BaggageExceptionIf key, value or properties don't match with requirements or if allowed_keys don't contain selected key

The documentation for this class was generated from the following file: