Documentation ¶
Index ¶
- Constants
- Variables
- type Nats
- func (n *Nats) Close(_ context.Context) error
- func (n *Nats) DisplayError(msg *records.ErrorRecord) error
- func (n *Nats) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error
- func (n *Nats) Dynamic(ctx context.Context, dynamicOpts *opts.DynamicOptions, ...) error
- func (n *Nats) Name() string
- func (n *Nats) Read(_ context.Context, readOpts *opts.ReadOptions, ...) error
- func (n *Nats) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, ...) error
- func (n *Nats) Test(_ context.Context) error
- func (n *Nats) Write(_ context.Context, writeOpts *opts.WriteOptions, ...) error
Constants ¶
View Source
const BackendName = "nats"
Variables ¶
View Source
var ErrMissingSubject = errors.New("you must specify a subject to publish to")
Functions ¶
This section is empty.
Types ¶
type Nats ¶
type Nats struct { Client *nats.Conn // contains filtered or unexported fields }
func (*Nats) DisplayError ¶ added in v1.0.0
func (n *Nats) DisplayError(msg *records.ErrorRecord) error
DisplayError will parse an Error record and print (pretty) output to STDOUT
func (*Nats) DisplayMessage ¶ added in v1.0.0
func (n *Nats) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error
DisplayMessage will parse a Read record and print (pretty) output to STDOUT
func (*Nats) Read ¶
func (n *Nats) Read(_ context.Context, readOpts *opts.ReadOptions, resultsChan chan *records.ReadRecord, errorChan chan *records.ErrorRecord) error
func (*Nats) Relay ¶ added in v1.0.0
func (n *Nats) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, errorCh chan *records.ErrorRecord) error
func (*Nats) Write ¶
func (n *Nats) Write(_ context.Context, writeOpts *opts.WriteOptions, errorCh chan *records.ErrorRecord, messages ...*records.WriteRecord) error
Click to show internal directories.
Click to hide internal directories.