package topictypes
import "github.com/ydb-platform/ydb-go-sdk/v3/topic/topictypes"
Index ¶
- Constants
- type AutoPartitioningSettings
- func (s *AutoPartitioningSettings) FromRaw(raw *rawtopic.AutoPartitioningSettings)
- func (s *AutoPartitioningSettings) ToRaw(raw *rawtopic.AutoPartitioningSettings)
- type AutoPartitioningStrategy
- type AutoPartitioningWriteSpeedStrategy
- func (s *AutoPartitioningWriteSpeedStrategy) FromRaw(raw *rawtopic.AutoPartitioningWriteSpeedStrategy)
- func (s *AutoPartitioningWriteSpeedStrategy) ToRaw() rawtopic.AutoPartitioningWriteSpeedStrategy
- type Codec
- type Consumer
- type DescribeConsumerPartitionInfo
- type MeteringMode
- func (m *MeteringMode) FromRaw(raw rawtopic.MeteringMode)
- func (m *MeteringMode) ToRaw(raw *rawtopic.MeteringMode)
- type MultipleWindowsStat
- type OffsetRange
- type PartitionConsumerStats
- type PartitionInfo
- type PartitionSettings
- func (s *PartitionSettings) FromRaw(raw *rawtopic.PartitioningSettings)
- func (s *PartitionSettings) ToRaw(raw *rawtopic.PartitioningSettings)
- type PartitionStats
- type TopicConsumerDescription
- type TopicDescription
Constants ¶
const ( CodecRaw = Codec(rawtopiccommon.CodecRaw) CodecGzip = Codec(rawtopiccommon.CodecGzip) // CodecLzop not supported by default, customer need provide own codec library CodecLzop = Codec(rawtopiccommon.CodecLzop) // CodecZstd not supported by default, customer need provide own codec library CodecZstd = Codec(rawtopiccommon.CodecZstd) CodecCustomerFirst = Codec(rawtopiccommon.CodecCustomerFirst) CodecCustomerEnd = Codec(rawtopiccommon.CodecCustomerEnd) // last allowed custom codec id is CodecCustomerEnd-1 )
const ( MeteringModeUnspecified = MeteringMode(rawtopic.MeteringModeUnspecified) MeteringModeReservedCapacity = MeteringMode(rawtopic.MeteringModeReservedCapacity) MeteringModeRequestUnits = MeteringMode(rawtopic.MeteringModeRequestUnits) )
const ( AutoPartitioningStrategyUnspecified = AutoPartitioningStrategy(rawtopic.AutoPartitioningStrategyUnspecified) AutoPartitioningStrategyDisabled = AutoPartitioningStrategy(rawtopic.AutoPartitioningStrategyDisabled) AutoPartitioningStrategyScaleUp = AutoPartitioningStrategy(rawtopic.AutoPartitioningStrategyScaleUp) AutoPartitioningStrategyScaleUpAndDown = AutoPartitioningStrategy(rawtopic.AutoPartitioningStrategyScaleUpAndDown) AutoPartitioningStrategyPaused = AutoPartitioningStrategy(rawtopic.AutoPartitioningStrategyPaused) )
Types ¶
type AutoPartitioningSettings ¶
type AutoPartitioningSettings struct {
AutoPartitioningStrategy AutoPartitioningStrategy
AutoPartitioningWriteSpeedStrategy AutoPartitioningWriteSpeedStrategy
}
AutoPartitioningSettings contains settings for automatic partitioning
func (*AutoPartitioningSettings) FromRaw ¶
func (s *AutoPartitioningSettings) FromRaw(raw *rawtopic.AutoPartitioningSettings)
FromRaw convert internal format to public. Used internally only.
func (*AutoPartitioningSettings) ToRaw ¶
func (s *AutoPartitioningSettings) ToRaw(raw *rawtopic.AutoPartitioningSettings)
ToRaw convert public format to internal. Used internally only.
type AutoPartitioningStrategy ¶
type AutoPartitioningStrategy int32
AutoPartitioningStrategy defines the strategy for automatic partitioning
type AutoPartitioningWriteSpeedStrategy ¶
type AutoPartitioningWriteSpeedStrategy struct {
StabilizationWindow time.Duration
UpUtilizationPercent int32
DownUtilizationPercent int32
}
AutoPartitioningWriteSpeedStrategy contains settings for write speed strategy
func (*AutoPartitioningWriteSpeedStrategy) FromRaw ¶
func (s *AutoPartitioningWriteSpeedStrategy) FromRaw(raw *rawtopic.AutoPartitioningWriteSpeedStrategy)
FromRaw convert internal format to public. Used internally only.
func (*AutoPartitioningWriteSpeedStrategy) ToRaw ¶
func (s *AutoPartitioningWriteSpeedStrategy) ToRaw() rawtopic.AutoPartitioningWriteSpeedStrategy
ToRaw convert public format to internal. Used internally only.
type Codec ¶
type Codec int32
Codec code for use in topics Allow to use custom values in interval [10000,20000)
func (Codec) ToRaw ¶
func (c Codec) ToRaw(r *rawtopiccommon.Codec)
type Consumer ¶
type Consumer struct {
Name string
Important bool
SupportedCodecs []Codec
ReadFrom time.Time
Attributes map[string]string
}
Consumer contains info about topic consumer
func (*Consumer) FromRaw ¶
FromRaw convert internal format to public. Used internally only.
func (*Consumer) ToRaw ¶
ToRaw public format to internal. Used internally only.
type DescribeConsumerPartitionInfo ¶
type DescribeConsumerPartitionInfo struct {
PartitionID int64
Active bool
ChildPartitionIDs []int64
ParentPartitionIDs []int64
PartitionStats PartitionStats
PartitionConsumerStats PartitionConsumerStats
}
func (*DescribeConsumerPartitionInfo) FromRaw ¶
func (p *DescribeConsumerPartitionInfo) FromRaw(raw *rawtopic.DescribeConsumerResultPartitionInfo)
type MeteringMode ¶
type MeteringMode int
MeteringMode mode of topic's metering. Used for serverless installations.
func (*MeteringMode) FromRaw ¶
func (m *MeteringMode) FromRaw(raw rawtopic.MeteringMode)
FromRaw convert from internal format to public. Used internally only.
func (*MeteringMode) ToRaw ¶
func (m *MeteringMode) ToRaw(raw *rawtopic.MeteringMode)
ToRaw convert from public format to internal. Used internally only.
type MultipleWindowsStat ¶
func (*MultipleWindowsStat) FromRaw ¶
func (m *MultipleWindowsStat) FromRaw(raw *rawtopic.MultipleWindowsStat)
type OffsetRange ¶
type OffsetRange topiclistenerinternal.PublicOffsetsRange
type PartitionConsumerStats ¶
type PartitionConsumerStats struct {
LastReadOffset int64
CommittedOffset int64
ReadSessionID string
PartitionReadSessionCreateTime *time.Time
LastReadTime *time.Time
MaxReadTimeLag *time.Duration
MaxWriteTimeLag *time.Duration
BytesRead MultipleWindowsStat
ReaderName string
}
func (*PartitionConsumerStats) FromRaw ¶
func (s *PartitionConsumerStats) FromRaw(raw *rawtopic.PartitionConsumerStats)
type PartitionInfo ¶
type PartitionInfo struct {
PartitionID int64
Active bool
ChildPartitionIDs []int64
ParentPartitionIDs []int64
PartitionStats PartitionStats
}
PartitionInfo contains info about partition.
func (*PartitionInfo) FromRaw ¶
func (p *PartitionInfo) FromRaw(raw *rawtopic.PartitionInfo)
FromRaw convert from internal format to public. Used internally only.
type PartitionSettings ¶
type PartitionSettings struct {
MinActivePartitions int64
MaxActivePartitions int64
PartitionCountLimit int64
AutoPartitioningSettings AutoPartitioningSettings
}
PartitionSettings settings of partitions
func (*PartitionSettings) FromRaw ¶
func (s *PartitionSettings) FromRaw(raw *rawtopic.PartitioningSettings)
FromRaw convert internal format to public. Used internally only.
func (*PartitionSettings) ToRaw ¶
func (s *PartitionSettings) ToRaw(raw *rawtopic.PartitioningSettings)
ToRaw convert public format to internal. Used internally only.
type PartitionStats ¶
type PartitionStats struct {
PartitionsOffset OffsetRange
StoreSizeBytes int64
LastWriteTime *time.Time
MaxWriteTimeLag *time.Duration
BytesWritten MultipleWindowsStat
}
func (*PartitionStats) FromRaw ¶
func (p *PartitionStats) FromRaw(raw *rawtopic.PartitionStats)
type TopicConsumerDescription ¶
type TopicConsumerDescription struct {
Path string
Consumer Consumer
Partitions []DescribeConsumerPartitionInfo
}
func (*TopicConsumerDescription) FromRaw ¶
func (d *TopicConsumerDescription) FromRaw(raw *rawtopic.DescribeConsumerResult)
type TopicDescription ¶
type TopicDescription struct {
Path string
PartitionSettings PartitionSettings
Partitions []PartitionInfo
RetentionPeriod time.Duration
RetentionStorageMB int64
SupportedCodecs []Codec
PartitionWriteBurstBytes int64
PartitionWriteSpeedBytesPerSecond int64
Attributes map[string]string
Consumers []Consumer
MeteringMode MeteringMode
}
TopicDescription contains info about topic.
func (*TopicDescription) FromRaw ¶
func (d *TopicDescription) FromRaw(raw *rawtopic.DescribeTopicResult)
FromRaw convert from public format to internal. Used internally only.
Source Files ¶
- Version
- v3.115.0 (latest)
- Published
- Aug 17, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 8 months ago –
Tools for package owners.