package
2.4.4
Repository: https://github.com/huangjunwen/nproto.git
Documentation: pkg.go.dev

# Functions

AssertMsgType makes sure msg's type conform to the spec: reflect.TypeOf(msg) == spec.MsgType().
MustMsgSpec is must-version of NewMsgSpec.
MustRawDataMsgSpec is must-version of NewRawDataMsgSpec.
NewMsgAsyncPublisherWithMWs wraps a MsgAsyncPublisher with middlewares.
NewMsgPublisherWithMWs wraps a MsgPublisher with middlewares.
NewMsgSpec validates and creates a new MsgSpec.
NewMsgSubscriberWithMWs creates a new MsgSubscriberWithMWs.
NewRawDataMsgSpec validates and creates a new MsgSpec with *rawenc.RawData msg type.

# Variables

SubjectNameRegexp is subject name's format.

# Structs

MsgSubscriberWithMWs wraps a MsgSubscriber with middlewares.

# Interfaces

MsgAsyncPublisher is similar to MsgPublisher but in async manner.
MsgPublisher is used to publish messages.
MsgSpec is the contract between msg publisher and subscriber.
MsgSubscriber is used to consume messages.

# Type aliases

MsgAsyncPublisherFunc is an adapter to allow the use of ordinary functions as MsgAsyncPublisher.
MsgAsyncPublisherMiddleware wraps MsgAsyncPublisher into another one.
MsgHandler handles messages.
MsgMiddleware wraps a MsgHandler into another one.
MsgPublisherFunc is an adapter to allow the use of ordinary functions as MsgPublisher.
MsgPublisherMiddleware wraps MsgPublisher into another one.
MsgSubscriberFunc is an adapter to allow the use of ordinary functions as MsgSubscriber.