Documentation ¶
Index ¶
- Constants
- Variables
- type NatsJetstream
- func (n *NatsJetstream) Close(_ context.Context) error
- func (n *NatsJetstream) DisplayError(msg *records.ErrorRecord) error
- func (n *NatsJetstream) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error
- func (n *NatsJetstream) Name() string
- func (n *NatsJetstream) Read(ctx context.Context, readOpts *opts.ReadOptions, ...) error
- func (n *NatsJetstream) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, ...) error
- func (n *NatsJetstream) Test(_ context.Context) error
- func (n *NatsJetstream) Tunnel(ctx context.Context, tunnelOpts *opts.TunnelOptions, tunnelSvc tunnel.ITunnel, ...) error
- func (n *NatsJetstream) Write(_ context.Context, writeOpts *opts.WriteOptions, ...) error
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) 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) 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.