pipe

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipe

type Pipe struct {
	CMQ       *cmq.CMQ
	Streaming *streaming.Streaming
	Tracer    trace.Tracer
	Logger    *zap.Logger
}

func New

func New(c *cmq.CMQ, s *streaming.Streaming, logger *zap.Logger, tracer trace.Tracer) *Pipe

New create pipe to pipe data from streaming to jetstream. you can use a single pipe instance for mutiple topics.

func (*Pipe) Pipe

func (p *Pipe) Pipe(topic string)

Pipe start piping messages from streaming to jetstream based on given topic. its subscription on streaming isn't durable and it always start from 1 second behind. the reason here is to reduce load on the streaming server as much as possible.

Jump to

Keyboard shortcuts

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