Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTopicExist ¶
IsTopicExist returns whether an error is caused by a topic already existing.
func NewLeastBytesPartitioner ¶ added in v1.1.0
func NewLeastBytesPartitioner(topic string) sarama.Partitioner
NewLeastBytesPartitioner function takes topic as an argument, but it is not used. This has been done as it implements the sarama.PartitionerConstructor interface which requires it.
Types ¶
type Consumer ¶
type Consumer interface { Fetch(context.Context) (Message, error) Commit(context.Context, Message) error GroupMode() bool Close() error }
Consumer represents a Kafka Consumer.
func NewConsumer ¶
NewConsumer returns a new Kafka Consumer.
type Manager ¶
type Manager interface { CreateTopic(topic string, partitions, replication int) error Close() error }
Manager represents an object that can manage Kafka Producers and Consumers.
func NewManager ¶
func NewManager(cc conf.ConnectorConfig, bc conf.NATSKafkaBridgeConfig) (Manager, error)
NewManager returns a Kafka Manager.
type Producer ¶
Producer represents a Kafka producer.
func NewErroredProducer ¶
NewErroredProducer returns a Producer that fails when any methods are called.
func NewProducer ¶
func NewProducer(cc conf.ConnectorConfig, bc conf.NATSKafkaBridgeConfig, topic string) (Producer, error)
NewProducer returns a new Kafka Producer.
Click to show internal directories.
Click to hide internal directories.