Documentation ¶
Index ¶
Constants ¶
View Source
const (
TopicLogTrace string = "logTrace"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KafkaConsumer ¶
type KafkaConsumer struct {
// contains filtered or unexported fields
}
func (*KafkaConsumer) Init ¶
func (self *KafkaConsumer) Init() error
func (*KafkaConsumer) StartKafkaListen ¶
func (self *KafkaConsumer) StartKafkaListen(listenMsg func(*sarama.ConsumerMessage)) error
注意该方法是非阻塞的,如果调用了该方法,并且没有其他的阻塞方法,记得手动阻塞他
type KafkaProducer ¶
type KafkaProducer struct {
// contains filtered or unexported fields
}
func (*KafkaProducer) Close ¶
func (self *KafkaProducer) Close() error
func (*KafkaProducer) Init ¶
func (self *KafkaProducer) Init() error
func (*KafkaProducer) SendMessage ¶
func (self *KafkaProducer) SendMessage(topic string, data []byte) error
Click to show internal directories.
Click to hide internal directories.