gomicrosvc

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Channels map[string]chan *[]byte

Channels for Sync RPC

View Source
var Handlers map[string]func(data *[]byte) (*[]byte, error)

Handlers map for dispatch

Functions

func AsyncRPCCall

func AsyncRPCCall(routingKey string, message *[]byte)

func Bind added in v0.0.2

func Bind(foreground bool) error

Bind starts consumer

func Initialize

func Initialize(app string, rabbitmqHost string, rabbitmqUser string,
	rabbitmqPass string, rabbitmqExchange string, threadsNumber int,
	handlers []func(data *[]byte) (*[]byte, error)) error

Initialize gomicrosvc

func RPCCall

func RPCCall(routingKey string, message *[]byte) (*[]byte, error)

Types

type Configuration

type Configuration struct {
	App         string
	Rabbitmq    Rabbitmq
	Concurrency int
}
var Config Configuration

type Rabbitmq

type Rabbitmq struct {
	Host     string
	User     string
	Password string
	Exchange string
}

Jump to

Keyboard shortcuts

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