kafka

package
v0.0.0-...-4d250b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpawnConsumer

func SpawnConsumer(kc *KafkaConsumer, redis *redis.Redis, quit <-chan os.Signal)

Types

type KafkaConsumer

type KafkaConsumer struct {
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(host, port, topic, groupID string) (*KafkaConsumer, error)

func (*KafkaConsumer) Close

func (kc *KafkaConsumer) Close()

type KafkaProducer

type KafkaProducer struct {
	Topic *string
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(host, port, topic string) (*KafkaProducer, error)

func (*KafkaProducer) Close

func (kp *KafkaProducer) Close()

func (*KafkaProducer) Produce

func (kp *KafkaProducer) Produce(event []byte) error

type NumberEvent

type NumberEvent struct {
	EventType string `json:"type"`
	Number    int    `json:"number"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳