redis

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

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

func Read

func Read(opts *cli.Options) error

func Write

func Write(opts *cli.Options) error

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

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

Write is a wrapper for amqp Publish method. We wrap it so that we can mock it in tests, add logging etc.

Jump to

Keyboard shortcuts

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