rawtopicwriter

package
v3.93.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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 InitRequest struct {
	Path             string
	ProducerID       string
	WriteSessionMeta map[string]string

	Partitioning Partitioning

	GetLastSeqNo bool
	// contains filtered or unexported fields
}

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

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 WriteStatistics struct {
	PersistingTime     time.Duration
	MinQueueWaitTime   time.Duration
	MaxQueueWaitTime   time.Duration
	TopicQuotaWaitTime time.Duration
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL