rpcqueue

package
v1.23.70 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCQueue

type RPCQueue struct {
	// contains filtered or unexported fields
}

RPCQueue is the class for all the RPCs

func NewRPCQueue

func NewRPCQueue(ctx context.Context, conn *amqp.Connection, exchangeName, reqQueueName string, timeout time.Duration) (rq *RPCQueue, err error)

NewRPCQueue creates a new RPC Queue

func (*RPCQueue) ConsumeReplyRoutine

func (rq *RPCQueue) ConsumeReplyRoutine(msgs <-chan amqp.Delivery)

ConsumeReplyRoutine 消费响应

func (*RPCQueue) SendRequest

func (rq *RPCQueue) SendRequest(corrID string, queueNamereqBody interface{}) (string, error)

SendRequest 发送请求,并且监听等待响应。请求和响应都是JSON序列化的对象。

Jump to

Keyboard shortcuts

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