Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NatsTransporter ¶
type NatsTransporter struct {
// contains filtered or unexported fields
}
NatsTransporter implements the yarf.Transport for using Nats
func NewNatsTransporter ¶
func NewNatsTransporter(servers string, timeout time.Duration, opts ...nats.Option) (*NatsTransporter, error)
NewNatsTransporter a constructor for the NatsTransporter
func NewNatsTransporterFromConn ¶
func NewNatsTransporterFromConn(natsConnection *nats.Conn, timeout time.Duration) (*NatsTransporter, error)
NewNatsTransporterFromConn a constructor for the NatsTransporter using an existing nats connection
func (*NatsTransporter) Call ¶
func (n *NatsTransporter) Call(ctx context.Context, function string, requestData []byte) (response []byte, err error)
Call implements client side call of transporter
func (*NatsTransporter) Close ¶
func (n *NatsTransporter) Close() error
Close the nats transporter and the nats client
Click to show internal directories.
Click to hide internal directories.