Documentation ¶
Index ¶
- func Client() *client
- func Consumer() iConsumer
- func Init(conf Config) error
- func OffsetInfo(topic, groupId string) (data []map[string]int64)
- func Partitions(topic string) []int32
- func Producer() iProducer
- func Topics() []string
- type Config
- type ConsumerError
- type ConsumerHandler
- type ConsumerMessage
- type MessageHandler
- type ProducerMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OffsetInfo ¶ added in v1.1.153
分区数量
Types ¶
type Config ¶ added in v1.1.2
type Config struct { User string `json:"user" yaml:"user"` Password string `json:"password" yaml:"password"` Addrs []string `json:"addrs" yaml:"addrs"` Timeout int `json:"timeout" yaml:"timeout"` HeartbeatInterval int `json:"heartbeat_interval" yaml:"heartbeat_interval"` SessionTimeout int `json:"session_timeout" yaml:"session_timeout"` RebalanceTimeout int `json:"rebalance_timeout" yaml:"rebalance_timeout"` }
type ConsumerError ¶
type ConsumerError struct {
*sarama.ConsumerError
}
type ConsumerHandler ¶
type ConsumerHandler func(msg *ConsumerMessage, consumerErr *ConsumerError) error
type ConsumerMessage ¶
type ConsumerMessage struct {
*sarama.ConsumerMessage
}
type MessageHandler ¶ added in v1.1.66
type MessageHandler func(msg *ProducerMessage, err error)
type ProducerMessage ¶ added in v1.1.66
type ProducerMessage struct {
*sarama.ProducerMessage
}
Click to show internal directories.
Click to hide internal directories.