Documentation ¶
Index ¶
- type Consumer
- type Kafka
- func (k *Kafka) ConnectConsumers(urls []string) error
- func (k *Kafka) ConnectProducers(urls []string) error
- func (k *Kafka) CreateConsumers(quantity int) error
- func (k *Kafka) CreateProducers(quantity int) error
- func (k *Kafka) ExecuteConsumers(topic string) error
- func (k *Kafka) ExecuteProducers(topic string) (err error)
- type Message
- type Producer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer is struct for consumers
func (*Consumer) ConnectConsumer ¶
ConnectConsumer is connect in kafka
func (*Consumer) ConsumeMessage ¶
ConsumeMessage return messages from Kafka
type Kafka ¶
Kafka is struct for kafka broker
func (*Kafka) ConnectConsumers ¶
ConnectConsumers connect all consumers in broker
func (*Kafka) ConnectProducers ¶
ConnectProducers connect all producers in broker
func (*Kafka) CreateConsumers ¶
CreateConsumers generate consumers the kafka
func (*Kafka) CreateProducers ¶
CreateProducers generate producers the kafka
func (*Kafka) ExecuteConsumers ¶
ExecuteConsumers execute logic for all consumers in broker
func (*Kafka) ExecuteProducers ¶
ExecuteProducers execute logic for all producers in broker
type Message ¶
type Message struct { Name string `json:"name"` Email string `json:"email"` Phone string `json:"phone"` }
Message is struct for message
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
Producer is struct for producers
func (*Producer) ConnectProducer ¶
ConnectProducer is connect in kafka
func (*Producer) ProduceMessage ¶
ProduceMessage execut send the msg to kafka
Click to show internal directories.
Click to hide internal directories.