Documentation ¶
Index ¶
- Constants
- func WithGroupName(gpn string) consumerOpt
- func WithName(n string) consumerOpt
- func WithRetry(n int32) consumerOpt
- type Consumer
- func (c *Consumer) Cleanup(session sarama.ConsumerGroupSession) error
- func (c *Consumer) Consume(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim, ...) error
- func (c *Consumer) Setup(session sarama.ConsumerGroupSession) error
- func (c *Consumer) Start() error
- func (c *Consumer) Stop() error
- type Handler
- type KafkaMQCredentials
- type M
- type OtsConfig
- type RedisConfig
- type Subscription
Constants ¶
View Source
const ( XServiceChainReal = "real" XServiceChainVirtual = "virtual" )
View Source
const (
KAFKAENV = "kakfaDebug"
)
Variables ¶
This section is empty.
Functions ¶
func WithGroupName ¶
func WithGroupName(gpn string) consumerOpt
Types ¶
type Consumer ¶
func NewConsumer ¶
func NewConsumer(cred *KafkaMQCredentials, ots *OtsConfig, rds *RedisConfig, subs []Subscription, opts ...consumerOpt) (*Consumer, error)
初始化
func (*Consumer) Consume ¶
func (c *Consumer) Consume(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim, msg *sarama.ConsumerMessage) error
type KafkaMQCredentials ¶
type RedisConfig ¶
Click to show internal directories.
Click to hide internal directories.