Versions in this module Expand all Collapse all v2 v2.0.2 Apr 16, 2020 v2.0.1 Apr 16, 2020 Changes in this version + func WriteMsg(ctx context.Context, m binding.Message, natsMessage *nats.Msg, ...) error + type Message struct + Msg *nats.Msg + func NewMessage(msg *nats.Msg) *Message + func (m *Message) Finish(err error) error + func (m *Message) ReadBinary(ctx context.Context, encoder binding.BinaryWriter) error + func (m *Message) ReadEncoding() binding.Encoding + func (m *Message) ReadStructured(ctx context.Context, encoder binding.StructuredWriter) error + type Option func(*Protocol) error + func WithConnOptions(opts ...nats.Option) Option + func WithTransformer(transformer binding.TransformerFactory) Option + type Protocol struct + Conn *nats.Conn + ConnOptions []nats.Option + NatsURL string + Subject string + Transformers binding.TransformerFactories + func New(natsURL, subject string, opts ...Option) (*Protocol, error) + func (t *Protocol) Close(ctx context.Context) error + func (t *Protocol) Receive(ctx context.Context) (binding.Message, error) + func (t *Protocol) Send(ctx context.Context, in binding.Message) error