Documentation ¶
Index ¶
- Constants
- type AlterOption
- func AlterConsumerWithAttributes(name string, attributes map[string]string) AlterOption
- func AlterConsumerWithImportant(name string, important bool) AlterOption
- func AlterConsumerWithReadFrom(name string, readFrom time.Time) AlterOption
- func AlterConsumerWithSupportedCodecs(name string, codecs []topictypes.Codec) AlterOption
- func AlterWithAddConsumers(consumers ...topictypes.Consumer) AlterOption
- func AlterWithAttributes(attributes map[string]string) AlterOption
- func AlterWithDropConsumers(consumersName ...string) AlterOption
- func AlterWithMinActivePartitions(minActivePartitions int64) AlterOption
- func AlterWithPartitionCountLimit(partitionCountLimit int64) AlterOption
- func AlterWithPartitionWriteBurstBytes(burstBytes int64) AlterOption
- func AlterWithPartitionWriteSpeedBytesPerSecond(bytesPerSecond int64) AlterOption
- func AlterWithRetentionPeriod(retentionPeriod time.Duration) AlterOption
- func AlterWithRetentionStorageMB(retentionStorageMB int64) AlterOption
- func AlterWithSupportedCodecs(codecs ...topictypes.Codec) AlterOption
- type CommitMode
- type CreateDecoderFunc
- type CreateOption
- func CreateWithAttributes(attributes map[string]string) CreateOption
- func CreateWithConsumer(consumers ...topictypes.Consumer) CreateOption
- func CreateWithMinActivePartitions(count int64) CreateOption
- func CreateWithPartitionCountLimit(count int64) CreateOption
- func CreateWithPartitionWriteBurstBytes(partitionWriteBurstBytes int64) CreateOption
- func CreateWithPartitionWriteSpeedBytesPerSecond(partitionWriteSpeedBytesPerSecond int64) CreateOption
- func CreateWithRetentionPeriod(retentionPeriod time.Duration) CreateOption
- func CreateWithRetentionStorageMB(retentionStorageMB int64) CreateOption
- type DescribeOption
- type DropOption
- type GetPartitionStartOffsetFunc
- type GetPartitionStartOffsetRequest
- type GetPartitionStartOffsetResponse
- type ReadSelector
- type ReadSelectors
- type ReaderOption
- func WithAddDecoder(codec topictypes.Codec, decoderCreate CreateDecoderFunc) ReaderOption
- func WithBatchReadMaxCount(count int) ReaderOption
- func WithBatchReadMinCount(count int) ReaderOption
- func WithCommitCountTrigger(count int) ReaderOption
- func WithCommitMode(mode CommitMode) ReaderOption
- func WithCommitTimeLagTrigger(lag time.Duration) ReaderOption
- func WithCommonConfig(common config.Common) ReaderOption
- func WithGetPartitionStartOffset(f GetPartitionStartOffsetFunc) ReaderOption
- func WithMessagesBufferSize(size int) ReaderOption
- func WithReaderOperationCancelAfter(cancelAfter time.Duration) ReaderOption
- func WithReaderOperationTimeout(timeout time.Duration) ReaderOption
- func WithTracer(tracer trace.Topic) ReaderOption
- type TopicOption
Constants ¶
const ( // CommitModeAsync - commit return true if commit success add to internal send buffer (but not sent to server) // now it is grpc buffer, in feature it may be internal sdk buffer CommitModeAsync = topicreaderinternal.CommitModeAsync // default // CommitModeNone - reader will not be commit operation CommitModeNone = topicreaderinternal.CommitModeNone // CommitModeSync - commit return true when sdk receive ack of commit from server // The mode needs strong ordering client code for prevent deadlock. // Example: // Good: // CommitOffset(1) // CommitOffset(2) // // Deadlock: // CommitOffset(2) - server will wait commit offset 1 before send ack about offset 1 and 2 committed. // CommitOffset(1) CommitModeSync = topicreaderinternal.CommitModeSync )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlterOption ¶
type AlterOption func(req *rawtopic.AlterTopicRequest)
AlterOption
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterConsumerWithAttributes ¶
func AlterConsumerWithAttributes(name string, attributes map[string]string) AlterOption
AlterConsumerWithAttributes
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterConsumerWithImportant ¶
func AlterConsumerWithImportant(name string, important bool) AlterOption
AlterConsumerWithImportant
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterConsumerWithReadFrom ¶
func AlterConsumerWithReadFrom(name string, readFrom time.Time) AlterOption
AlterConsumerWithReadFrom
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterConsumerWithSupportedCodecs ¶
func AlterConsumerWithSupportedCodecs(name string, codecs []topictypes.Codec) AlterOption
AlterConsumerWithSupportedCodecs
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithAddConsumers ¶
func AlterWithAddConsumers(consumers ...topictypes.Consumer) AlterOption
AlterWithAddConsumers
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithAttributes ¶
func AlterWithAttributes(attributes map[string]string) AlterOption
AlterWithAttributes
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithDropConsumers ¶
func AlterWithDropConsumers(consumersName ...string) AlterOption
AlterWithDropConsumers
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithMinActivePartitions ¶
func AlterWithMinActivePartitions(minActivePartitions int64) AlterOption
AlterWithMinActivePartitions
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithPartitionCountLimit ¶
func AlterWithPartitionCountLimit(partitionCountLimit int64) AlterOption
AlterWithPartitionCountLimit
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithPartitionWriteBurstBytes ¶
func AlterWithPartitionWriteBurstBytes(burstBytes int64) AlterOption
AlterWithPartitionWriteBurstBytes
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithPartitionWriteSpeedBytesPerSecond ¶
func AlterWithPartitionWriteSpeedBytesPerSecond(bytesPerSecond int64) AlterOption
AlterWithPartitionWriteSpeedBytesPerSecond
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithRetentionPeriod ¶
func AlterWithRetentionPeriod(retentionPeriod time.Duration) AlterOption
AlterWithRetentionPeriod
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithRetentionStorageMB ¶
func AlterWithRetentionStorageMB(retentionStorageMB int64) AlterOption
AlterWithRetentionStorageMB
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func AlterWithSupportedCodecs ¶
func AlterWithSupportedCodecs(codecs ...topictypes.Codec) AlterOption
AlterWithSupportedCodecs
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type CommitMode ¶
type CommitMode = topicreaderinternal.PublicCommitMode
CommitMode
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type CreateDecoderFunc ¶
type CreateDecoderFunc = topicreaderinternal.PublicCreateDecoderFunc
CreateDecoderFunc
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type CreateOption ¶
type CreateOption func(request *rawtopic.CreateTopicRequest)
CreateOption
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func CreateWithAttributes ¶
func CreateWithAttributes(attributes map[string]string) CreateOption
CreateWithAttributes
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func CreateWithConsumer ¶
func CreateWithConsumer(consumers ...topictypes.Consumer) CreateOption
CreateWithConsumer
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func CreateWithMinActivePartitions ¶
func CreateWithMinActivePartitions(count int64) CreateOption
CreateWithMinActivePartitions
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func CreateWithPartitionCountLimit ¶
func CreateWithPartitionCountLimit(count int64) CreateOption
CreateWithPartitionCountLimit
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func CreateWithPartitionWriteBurstBytes ¶
func CreateWithPartitionWriteBurstBytes(partitionWriteBurstBytes int64) CreateOption
CreateWithPartitionWriteBurstBytes
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func CreateWithPartitionWriteSpeedBytesPerSecond ¶
func CreateWithPartitionWriteSpeedBytesPerSecond(partitionWriteSpeedBytesPerSecond int64) CreateOption
CreateWithPartitionWriteSpeedBytesPerSecond
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func CreateWithRetentionPeriod ¶
func CreateWithRetentionPeriod(retentionPeriod time.Duration) CreateOption
CreateWithRetentionPeriod
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func CreateWithRetentionStorageMB ¶
func CreateWithRetentionStorageMB(retentionStorageMB int64) CreateOption
CreateWithRetentionStorageMB
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type DescribeOption ¶
type DescribeOption func(req *rawtopic.DescribeTopicRequest)
DescribeOption
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type DropOption ¶
type DropOption func(request *rawtopic.DropTopicRequest)
DropOption
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type GetPartitionStartOffsetFunc ¶
type GetPartitionStartOffsetFunc = topicreaderinternal.PublicGetPartitionStartOffsetFunc
GetPartitionStartOffsetFunc
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type GetPartitionStartOffsetRequest ¶
type GetPartitionStartOffsetRequest = topicreaderinternal.PublicGetPartitionStartOffsetRequest
GetPartitionStartOffsetRequest
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type GetPartitionStartOffsetResponse ¶
type GetPartitionStartOffsetResponse = topicreaderinternal.PublicGetPartitionStartOffsetResponse
GetPartitionStartOffsetResponse
type ReadSelector ¶
type ReadSelector = topicreaderinternal.PublicReadSelector
ReadSelector
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type ReadSelectors ¶
type ReadSelectors []ReadSelector
ReadSelectors
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func ReadTopic ¶
func ReadTopic(path string) ReadSelectors
ReadTopic create simple selector for read topics
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type ReaderOption ¶
type ReaderOption = topicreaderinternal.PublicReaderOption
ReaderOption
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithAddDecoder ¶
func WithAddDecoder(codec topictypes.Codec, decoderCreate CreateDecoderFunc) ReaderOption
WithAddDecoder
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithBatchReadMaxCount ¶
func WithBatchReadMaxCount(count int) ReaderOption
WithBatchReadMaxCount
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithBatchReadMinCount ¶
func WithBatchReadMinCount(count int) ReaderOption
WithBatchReadMinCount
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithCommitCountTrigger ¶
func WithCommitCountTrigger(count int) ReaderOption
WithCommitCountTrigger set count trigger for send batch to server if count > 0 and sdk count of buffered commits >= count - send commit request to server 0 mean no count limit and use timer lag trigger only
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithCommitMode ¶
func WithCommitMode(mode CommitMode) ReaderOption
WithCommitMode
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithCommitTimeLagTrigger ¶
func WithCommitTimeLagTrigger(lag time.Duration) ReaderOption
WithCommitTimeLagTrigger set time lag from first commit message before send commit to server for accumulate many similar-time commits to one server request 0 mean no additional lag and send commit soon as possible Default value: 1 second
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithCommonConfig ¶
func WithCommonConfig(common config.Common) ReaderOption
WithCommonConfig
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithGetPartitionStartOffset ¶
func WithGetPartitionStartOffset(f GetPartitionStartOffsetFunc) ReaderOption
WithGetPartitionStartOffset
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithMessagesBufferSize ¶
func WithMessagesBufferSize(size int) ReaderOption
WithMessagesBufferSize
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithReaderOperationCancelAfter ¶
func WithReaderOperationCancelAfter(cancelAfter time.Duration) ReaderOption
WithReaderOperationCancelAfter
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithReaderOperationTimeout ¶
func WithReaderOperationTimeout(timeout time.Duration) ReaderOption
WithReaderOperationTimeout
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithTracer ¶
func WithTracer(tracer trace.Topic) ReaderOption
WithTracer
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
type TopicOption ¶
TopicOption
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithOperationCancelAfter ¶
func WithOperationCancelAfter(operationCancelAfter time.Duration) TopicOption
WithOperationCancelAfter set the maximum amount of time a YDB server will process an operation. After timeout exceeds YDB will try to cancel operation and if it succeeds appropriate error will be returned to the client; otherwise processing will be continued. If OperationCancelAfter is zero then no timeout is used.
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithOperationTimeout ¶
func WithOperationTimeout(operationTimeout time.Duration) TopicOption
WithOperationTimeout set the maximum amount of time a YDB server will process an operation. After timeout exceeds YDB will try to cancel operation and regardless of the cancellation appropriate error will be returned to the client. If OperationTimeout is zero then no timeout is used.
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
func WithTrace ¶
func WithTrace(trace trace.Topic, opts ...trace.TopicComposeOption) TopicOption
WithTrace defines trace over persqueue client calls
Experimental ¶
Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.