userver: userver/ydb/topic_writer_types.hpp File Reference
Loading...
Searching...
No Matches
topic_writer_types.hpp File Reference

Detailed Description

Types for YDB topic writer.

Definition in file topic_writer_types.hpp.

Go to the source code of this file.

#include <memory>
#include <string>
#include <string_view>
#include <unordered_map>
#include <ydb-cpp-sdk/client/topic/write_events.h>
#include <userver/utils/impl/internal_tag.hpp>
+ This graph shows which files directly or indirectly include this file:

Classes

class  ydb::TopicWriteResult
 Provides the result of the message handling. More...
 

Typedefs

using ydb::TopicWriterMetadata = std::unordered_map<std::string, std::string>
 Metadata associated with a YDB topic message (key-value pairs)
 
using ydb::TopicWriteEventState = NYdb::NTopic::TWriteSessionEvent::TWriteAck::EEventState
 

Enumerations

enum class  ydb::TopicWriteStatus : std::size_t {
  kOk ,
  kResourceExhausted ,
  kFail ,
  kNotReady ,
  kMaxCount
}
 Provides status code for storing messages to the internal queue. More...
 

Functions

std::string_view ydb::ToStringView (TopicWriteStatus status)
 Converts TopicWriteStatus to a human-readable string view.
 

Typedef Documentation

◆ TopicWriteEventState

using ydb::TopicWriteEventState = NYdb::NTopic::TWriteSessionEvent::TWriteAck::EEventState

YDB write acknowledgement event state.

See also
https://ydb.tech/docs/en/reference/ydb-sdk/topic#write

Definition at line 28 of file topic_writer_types.hpp.

◆ TopicWriterMetadata

using ydb::TopicWriterMetadata = std::unordered_map<std::string, std::string>

Metadata associated with a YDB topic message (key-value pairs)

Definition at line 24 of file topic_writer_types.hpp.

Enumeration Type Documentation

◆ TopicWriteStatus

enum class ydb::TopicWriteStatus : std::size_t
strong

Provides status code for storing messages to the internal queue.

Enumerator
kOk 

Message has been put into the internal queue.

kResourceExhausted 

Internal queue is full.

kFail 

Other error.

kNotReady 

Not used for the moment, we accept all messages for handling.

kMaxCount 
Warning
Do not use this value

Definition at line 31 of file topic_writer_types.hpp.

Function Documentation

◆ ToStringView()

std::string_view ydb::ToStringView ( TopicWriteStatus status)

Converts TopicWriteStatus to a human-readable string view.

Parameters
statusthe status to convert
Returns
string_view representation of the status