pulsar

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	Client pulsar.Client

	Consumer pulsar.Consumer
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(topic, subsName string, opt pulsar.ClientOptions) (*Consumer, error)

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Process

func (c *Consumer) Process(ctx context.Context, handler event.ConsumerHandler) error

type Producer

type Producer struct {
	Client pulsar.Client
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(topic string, opt pulsar.ClientOptions) (*Producer, error)

func (*Producer) BatchSend

func (p *Producer) BatchSend(ctx context.Context, msg []event.Event) error

func (*Producer) Close

func (p *Producer) Close() error

func (*Producer) Send

func (p *Producer) Send(ctx context.Context, msg event.Event) error

Jump to

Keyboard shortcuts

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