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