Documentation
¶
Index ¶
- Variables
- func InitTopic(bootstrapUrl string, topics ...string) (err error)
- func NewConsumer(ctx context.Context, broker string, groupId string, topic string, ...) error
- func NewConsumerWithMultipleTopics(ctx context.Context, broker string, groupId string, topics []string, ...) error
- type KeySeparationBalancer
- type Producer
- func NewProducer(ctx context.Context, bootstrapUrl string, topic string, debug bool) (*Producer, error)
- func NewProducerWithBalancer(ctx context.Context, broker string, topic string, debug bool, ...) (*Producer, error)
- func NewProducerWithKeySeparationBalancer(ctx context.Context, bootstrapUrl string, topic string, debug bool) (*Producer, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var UseFunctionWithTimeoutError = errors.New("handler timeout")
Functions ¶
func NewConsumer ¶
Types ¶
type KeySeparationBalancer ¶
type KeySeparationBalancer struct { SubBalancer kafka.Balancer Seperator string }
func (*KeySeparationBalancer) Balance ¶
func (this *KeySeparationBalancer) Balance(msg kafka.Message, partitions ...int) (partition int)
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
func NewProducer ¶
func NewProducerWithBalancer ¶
Click to show internal directories.
Click to hide internal directories.