nsq

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const BackendName = "NSQ"

Variables

View Source
var (
	ErrMissingAddress = errors.New("you must specify either --nsqd-address or --lookupd-address")
	ErrChooseAddress  = errors.New("you must specify either --nsqd-address or --lookupd-address, not both")
	ErrMissingTopic   = errors.New("--topic cannot be empty")
)

Functions

This section is empty.

Types

type NSQ

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

func New added in v1.0.0

func New(opts *opts.ConnectionOptions) (*NSQ, error)

func (*NSQ) Close added in v1.0.0

func (n *NSQ) Close(_ context.Context) error

func (*NSQ) DisplayError added in v1.0.0

func (n *NSQ) DisplayError(msg *records.ErrorRecord) error

DisplayError will parse an Error record and print (pretty) output to STDOUT

func (*NSQ) DisplayMessage added in v1.0.0

func (n *NSQ) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error

func (*NSQ) Name added in v1.0.0

func (n *NSQ) Name() string

func (*NSQ) Read

func (n *NSQ) Read(ctx context.Context, readOpts *opts.ReadOptions, resultsChan chan *records.ReadRecord, errorChan chan *records.ErrorRecord) error

func (*NSQ) Relay added in v1.0.0

func (n *NSQ) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, errorCh chan<- *records.ErrorRecord) error

func (*NSQ) Test added in v1.0.0

func (n *NSQ) Test(_ context.Context) error

func (*NSQ) Tunnel added in v1.4.0

func (n *NSQ) Tunnel(ctx context.Context, tunnelOpts *opts.TunnelOptions, tunnelSvc tunnel.ITunnel, errorCh chan<- *records.ErrorRecord) error

func (*NSQ) Write

func (n *NSQ) Write(ctx context.Context, writeOpts *opts.WriteOptions, errorCh chan<- *records.ErrorRecord, messages ...*records.WriteRecord) error

type NSQLogger

type NSQLogger struct {
	*logrus.Entry
}

NSQLogger wraps logrus and implements the Output() method so we can satisfy the interface requirements for NSQ's logger

func (*NSQLogger) Output

func (n *NSQLogger) Output(_ int, s string) error

Output writes an NSQ log message via logrus

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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