nats

package
v0.0.0-...-d71c197 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoReceivers = errors.New("no known receivers")
)

Functions

This section is empty.

Types

type HandlerFunc

type HandlerFunc func(ctx context.Context, message *protocol.Message, replyFunc ReplyFunc)

type ReplyFunc

type ReplyFunc func(message *protocol.Message) error

type ReplyHandlerFunc

type ReplyHandlerFunc func(ctx context.Context, message *protocol.Message)

type Request

type Request struct {
	Config          *protocol.Config
	SenderPublicKey protocol.Base58Bytes
	Subject         string
	Timeout         time.Duration
	// contains filtered or unexported fields
}

func (*Request) Close

func (request *Request) Close()

func (*Request) Receive

func (request *Request) Receive(handler HandlerFunc, matches ...protocol.MsgMatch) error

func (*Request) Send

func (request *Request) Send(dest, verb, msg string, uuid ...string) error

func (*Request) SendRequest

func (request *Request) SendRequest(handler ReplyHandlerFunc, dest, verb, msg string, uuid ...string) error

Jump to

Keyboard shortcuts

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