easypubsubpipe

package
v0.0.0-...-2ba4c8d Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NORMAL = 0
	CLOSED = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interceptor

type Interceptor func(msg *easypubsub.Message, handler MessageHandler) error

func ChainInterceptor

func ChainInterceptor(interceptors ...Interceptor) Interceptor

ChainInterceptor creates a single interceptor out of a chain of many interceptors. Execution is done in left-to-right order

type MessageHandler

type MessageHandler func(msg *easypubsub.Message) error

type Option

type Option func(o *options)

func WithInterceptors

func WithInterceptors(interceptors ...Interceptor) Option

func WithLogger

func WithLogger(logger easypubsub.Logger) Option

type Pipe

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

func New

func New(source *Source, sink *Sink, handler MessageHandler, opts ...Option) *Pipe

func (*Pipe) Close

func (pipe *Pipe) Close() error

func (*Pipe) Flow

func (pipe *Pipe) Flow(ctx context.Context) <-chan error

type Sink

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

func NewSink

func NewSink(topic string, publisher easypubsub.Publisher) *Sink

type Source

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

func NewSource

func NewSource(topic string, subscriber easypubsub.Subscriber) *Source

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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