rpubsub

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RetryReadInterval = 5 * time.Second
)

Variables

View Source
var (
	ErrMissingChannel = errors.New("You must specify at least one channel")
)

Functions

func Dynamic added in v0.28.0

func Dynamic(opts *cli.Options) error

Dynamic starts up a new GRPC client connected to the dProxy service and receives a stream of outbound replay messages which are then written to the message bus.

func NewClient

func NewClient(opts *cli.Options) (*redis.Client, error)

func Read

func Read(opts *cli.Options, md *desc.MessageDescriptor) error

func Relay

func Relay(opts *cli.Options, relayCh chan interface{}, shutdownCtx context.Context) (relay.IRelayBackend, error)

Relay sets up a new RedisPubSub relayer

func Write

func Write(opts *cli.Options, md *desc.MessageDescriptor) error

Write is the entry point function for performing write operations in RedisPubSub.

This is where we verify that the passed args and flags combo makes sense, attempt to establish a connection, parse protobuf before finally attempting to perform the write.

Types

type Redis

type Redis struct {
	Options *cli.Options
	Client  *redis.Client
	MsgDesc *desc.MessageDescriptor
	// contains filtered or unexported fields
}

func (*Redis) Read

func (r *Redis) Read() error

func (*Redis) Write

func (r *Redis) Write(value []byte) error

type Relayer

type Relayer struct {
	Client  *redis.Client
	Options *cli.Options
	RelayCh chan interface{}

	Looper      *director.FreeLooper
	ShutdownCtx context.Context
	// contains filtered or unexported fields
}

func (*Relayer) Relay

func (r *Relayer) Relay() error

Relay reads messages from RedisPubSub and sends them to RelayCh which is then read by relay.Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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