rpcrmq

package module
v0.0.0-...-f9ba829 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

go-rpc-rabbitmq is a rabbitmq based rpc system.

Reference

AMQP concepts

Documentation

Overview

Package rpcrmq is a generated protocol buffer package.

It is generated from these files:

error.proto

It has these top-level messages:

ErrorMessage

Index

Constants

View Source
const MessageTypeError = "Error"
View Source
const MessageTypeRequest = "Request"
View Source
const MessageTypeResponse = "Response"

Variables

This section is empty.

Functions

func RegisterRPC

func RegisterRPC(rpcName string, svc *RPCService) error

func Request

func Request(con *amqp.Connection, method string, request []byte) ([]byte, error)

func RequestWithTimeout

func RequestWithTimeout(con *amqp.Connection, method string, request []byte, timeoutS int) ([]byte, error)

func SetTimeoutGlobal

func SetTimeoutGlobal(requestTimeoutS int)

func StartRPCServer

func StartRPCServer(endpoint string)

Types

type ErrorMessage

type ErrorMessage struct {
	Message string `protobuf:"bytes,1,opt,name=Message" json:"Message,omitempty"`
}

func (*ErrorMessage) Descriptor

func (*ErrorMessage) Descriptor() ([]byte, []int)

func (*ErrorMessage) ProtoMessage

func (*ErrorMessage) ProtoMessage()

func (*ErrorMessage) Reset

func (m *ErrorMessage) Reset()

func (*ErrorMessage) String

func (m *ErrorMessage) String() string

type RPCService

type RPCService struct {
	Callback func([]byte) ([]byte, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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