nats

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stream

type Stream struct {
	subscriber.Base
	// contains filtered or unexported fields
}

Stream for NATS queue

func MustNewStream

func MustNewStream(topics []string, url string, options ...nats.Option) *Stream

MustNewStream object

func NewStream

func NewStream(topics []string, url string, options ...nats.Option) (*Stream, error)

NewStream object

func (*Stream) Close

func (s *Stream) Close() error

Close nats client

func (*Stream) Send

func (s *Stream) Send(messages ...interface{}) (err error)

Send message

func (*Stream) Write

func (s *Stream) Write(data []byte) (err error)

Write binary message

type Subscriber

type Subscriber struct {
	subscriber.Base
	// contains filtered or unexported fields
}

Subscriber for NATS queue

func MustNewSubscriber

func MustNewSubscriber(url, group string, topics []string, options ...nats.Option) *Subscriber

MustNewSubscriber object

func NewSubscriber

func NewSubscriber(url, group string, topics []string, options ...nats.Option) (*Subscriber, error)

NewSubscriber object

func (*Subscriber) Close

func (s *Subscriber) Close() error

Close nats client

func (*Subscriber) Listen

func (s *Subscriber) Listen() (_ error)

Listen kafka consumer

Jump to

Keyboard shortcuts

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