sarama

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	Producer sarama.SyncProducer
}

func NewPublisher

func NewPublisher(producer sarama.SyncProducer) *Publisher

func (*Publisher) Write

func (p *Publisher) Write(event go_events.PublishableEvent) error

type Subscriber

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

func NewSubscriber

func NewSubscriber(consumerGroup sarama.ConsumerGroup) *Subscriber

func (*Subscriber) AddHandler

func (s *Subscriber) AddHandler(eventTypes []string, handler go_events.SubscriberHandlerFunc) error

func (*Subscriber) Subscribe

func (s *Subscriber) Subscribe(ctx context.Context) error

Subscribe uses the provided handler to handle the provided eventTypes (kafka topics)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL