nats_streaming

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const BackendName = "nats-streaming"

Variables

View Source
var (
	ErrEmptyChannel      = errors.New("channel cannot be empty")
	ErrInvalidReadOption = errors.New("You may only specify one read option of --last, --all, --seq, --since")
)

Functions

This section is empty.

Types

type NatsStreaming

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

func New added in v1.0.0

func New(connOpts *opts.ConnectionOptions) (*NatsStreaming, error)

func (*NatsStreaming) Close added in v1.0.0

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

func (*NatsStreaming) DisplayError added in v1.0.0

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

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

func (*NatsStreaming) DisplayMessage added in v1.0.0

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

DisplayMessage will parse a Read record and print (pretty) output to STDOUT

func (*NatsStreaming) Name added in v1.0.0

func (n *NatsStreaming) Name() string

func (*NatsStreaming) Read

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

func (*NatsStreaming) Relay added in v1.0.0

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

func (*NatsStreaming) Test added in v1.0.0

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

func (*NatsStreaming) Tunnel added in v1.4.0

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

func (*NatsStreaming) Write

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

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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