Documentation ¶
Index ¶
- Constants
- type ClientMessage
- type GrpcStream
- type InitRequest
- type InitResult
- type MessageData
- type MessageWriteStatus
- type Partitioning
- type PartitioningType
- type ServerMessage
- type StreamWriter
- type UpdateTokenRequest
- type UpdateTokenResponse
- type WriteAck
- type WriteRequest
- type WriteResult
- type WriteStatistics
- type WriteStatusSkipReason
- type WriteStatusType
Constants ¶
View Source
const ( WriteStatusSkipReasonUnspecified = WriteStatusSkipReason(Ydb_Topic.StreamWriteMessage_WriteResponse_WriteAck_Skipped_REASON_UNSPECIFIED) //nolint:lll WriteStatusSkipReasonAlreadyWritten = WriteStatusSkipReason(Ydb_Topic.StreamWriteMessage_WriteResponse_WriteAck_Skipped_REASON_ALREADY_WRITTEN) //nolint:lll )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientMessage ¶
type ClientMessage interface {
// contains filtered or unexported methods
}
type GrpcStream ¶
type GrpcStream interface { Send(messageNew *Ydb_Topic.StreamWriteMessage_FromClient) error Recv() (*Ydb_Topic.StreamWriteMessage_FromServer, error) CloseSend() error }
type InitRequest ¶
type InitResult ¶
type InitResult struct { rawtopiccommon.ServerMessageMetadata LastSeqNo int64 SessionID string PartitionID int64 SupportedCodecs rawtopiccommon.SupportedCodecs // contains filtered or unexported fields }
type MessageData ¶
type MessageData struct { SeqNo int64 CreatedAt time.Time UncompressedSize int64 Partitioning Partitioning MetadataItems []rawtopiccommon.MetadataItem Data []byte }
func (*MessageData) ToProto ¶ added in v3.38.0
func (d *MessageData) ToProto() (*Ydb_Topic.StreamWriteMessage_WriteRequest_MessageData, error)
type MessageWriteStatus ¶
type MessageWriteStatus struct { Type WriteStatusType WrittenOffset int64 SkippedReason WriteStatusSkipReason }
MessageWriteStatus is struct because it included in per-message structure and places on hot-path for write messages structure will work and compile-optimization better then interface
type Partitioning ¶
type Partitioning struct { Type PartitioningType MessageGroupID string PartitionID int64 }
Partitioning is struct because it included in per-message structure and places on hot-path for write messages structure will work and compile-optimization better then interface
func NewPartitioningMessageGroup ¶ added in v3.38.0
func NewPartitioningMessageGroup(messageGroupID string) Partitioning
func NewPartitioningPartitionID ¶ added in v3.38.0
func NewPartitioningPartitionID(partitionID int64) Partitioning
type PartitioningType ¶
type PartitioningType int
const ( PartitioningUndefined PartitioningType = iota PartitioningMessageGroupID PartitioningPartitionID )
type ServerMessage ¶
type ServerMessage interface { StatusData() rawtopiccommon.ServerMessageMetadata SetStatus(status rawydb.StatusCode) // contains filtered or unexported methods }
type StreamWriter ¶
type StreamWriter struct { Stream GrpcStream // contains filtered or unexported fields }
func (*StreamWriter) CloseSend ¶ added in v3.38.0
func (w *StreamWriter) CloseSend() error
func (*StreamWriter) Recv ¶
func (w *StreamWriter) Recv() (ServerMessage, error)
func (*StreamWriter) Send ¶
func (w *StreamWriter) Send(rawMsg ClientMessage) (err error)
type UpdateTokenRequest ¶ added in v3.38.0
type UpdateTokenRequest struct { rawtopiccommon.UpdateTokenRequest // contains filtered or unexported fields }
type UpdateTokenResponse ¶ added in v3.38.0
type UpdateTokenResponse struct { rawtopiccommon.UpdateTokenResponse rawtopiccommon.ServerMessageMetadata // contains filtered or unexported fields }
type WriteAck ¶
type WriteAck struct { SeqNo int64 MessageWriteStatus MessageWriteStatus }
type WriteRequest ¶
type WriteRequest struct { Messages []MessageData Codec rawtopiccommon.Codec Tx rawtopiccommon.TransactionIdentity // contains filtered or unexported fields }
type WriteResult ¶
type WriteResult struct { rawtopiccommon.ServerMessageMetadata Acks []WriteAck PartitionID int64 WriteStatistics WriteStatistics // contains filtered or unexported fields }
func (*WriteResult) GetAcks ¶ added in v3.77.1
func (r *WriteResult) GetAcks() (res traceAck)
GetAcks implemtnts trace.TopicWriterResultMessagesInfoAcks interface
type WriteStatistics ¶
type WriteStatusSkipReason ¶
type WriteStatusSkipReason int
type WriteStatusType ¶
type WriteStatusType int
const ( WriteStatusTypeWritten WriteStatusType = iota + 1 WriteStatusTypeSkipped WriteStatusTypeWrittenInTx )
func (WriteStatusType) String ¶ added in v3.77.1
func (t WriteStatusType) String() string
Click to show internal directories.
Click to hide internal directories.