rstreams

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func CreateConsumerGroups

func CreateConsumerGroups(ctx context.Context, client *redis.Client, opts *cli.RedisStreamsOptions) error

func NewClient

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

func NewStreamsClient

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

func Read

func Read(opts *cli.Options) error

func Relay

func Relay(opts *cli.Options) error

Relay sets up a new RedisStreams relayer, starts GRPC workers and the API server

func Write

func Write(opts *cli.Options) error

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

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 IRedisStreamsRelayer

type IRedisStreamsRelayer interface {
	Relay() error
}

type RedisStreams

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

func (*RedisStreams) Read

func (r *RedisStreams) Read() error

func (*RedisStreams) Write

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

type Relayer

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

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

func (*Relayer) Relay

func (r *Relayer) Relay() error

Relay reads messages from RedisStreams 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