nats_jetstream

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const BackendName = "nats-jetstream"

Variables

View Source
var (
	ErrMissingStream  = errors.New("--stream cannot be empty")
	ErrMissingSubject = errors.New("--subject cannot be empty")
)

Functions

This section is empty.

Types

type NatsJetstream

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

func New

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

func (*NatsJetstream) Close

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

func (*NatsJetstream) DisplayError

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

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

func (*NatsJetstream) DisplayMessage

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

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

func (*NatsJetstream) Name

func (n *NatsJetstream) Name() string

func (*NatsJetstream) Read

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

func (*NatsJetstream) Relay

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

func (*NatsJetstream) Test

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

func (*NatsJetstream) Tunnel added in v1.4.0

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

func (*NatsJetstream) Write

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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