nreq

package
v0.0.0-...-8c316eb Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

*

*
* @author nghiatc
* @since Dec 6, 2019

Index

Constants

This section is empty.

Variables

View Source
var DefaultTimeout int64 = 30

Functions

func Request

func Request(name string, subject string, data string) (*nats.Msg, error)

func RequestByte

func RequestByte(name string, subject string, data []byte) (*nats.Msg, error)

Types

type NRequest

type NRequest struct {
	Name    string
	Url     string
	Auth    string
	Opts    []nats.Option
	Timeout time.Duration
	Conn    *nats.Conn
}

func GetInstance

func GetInstance(name string) *NRequest

func NewNRequest

func NewNRequest(name string) *NRequest

func (*NRequest) Request

func (nr *NRequest) Request(subject string, data string) (*nats.Msg, error)

func (*NRequest) RequestByte

func (nr *NRequest) RequestByte(subject string, data []byte) (*nats.Msg, error)

Jump to

Keyboard shortcuts

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