Documentation ¶
Index ¶
Constants ¶
View Source
const ( // KafkaReadTimeout is the timeout for reading from kafka. KafkaReadTimeout = 10 * time.Minute // KafkaWaitTimeout is the timeout for waiting for kafka. KafkaWaitTimeout = 11 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { KafkaAddr []string // the CommitTs of binlog return by reader will bigger than the config CommitTs CommitTS int64 Offset int64 // start at kafka offset // if Topic is empty, use the default name in drainer <ClusterID>_obinlog Topic string ClusterID string // buffer size of messages of the reader internal. // default value 1. // suggest only setting the buffer size of this if you want the reader to buffer // message internal and leave `SaramaBufferSize` as 1 default. MessageBufferSize int // the sarama internal buffer size of messages. SaramaBufferSize int }
Config for Reader
type KafkaSeeker ¶
type KafkaSeeker struct {
// contains filtered or unexported fields
}
KafkaSeeker seeks offset in kafka topics by given condition
func NewKafkaSeeker ¶
func NewKafkaSeeker(addr []string, config *sarama.Config) (*KafkaSeeker, error)
NewKafkaSeeker creates an instance of KafkaSeeker
Click to show internal directories.
Click to hide internal directories.