Skip to content

MrAndreID/gorabbitmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MrAndreID / Go RabbitMQ

Go Reference License: MIT

The MrAndreID/GoRabbitMQ package is a collection of functions in the go language for RabbitMQ.


Table of Contents


Install

To use The MrAndreID/GoRabbitMQ package, you must follow the steps below:

go get -u github.com/MrAndreID/gorabbitmq

Usage

Client

import "github.com/MrAndreID/gohelpers"

err := gorabbitmq.Client("Andrea Adam", gorabbitmq.Connection{"127.0.0.1", "5672", "account", "account", "account"}, gorabbitmq.QueueSetting{"account", true, false, false, false, nil}, gorabbitmq.OtherSetting{"account", "60000", false, false, 18})

if err != nil {
    gohelpers.HandleResponse(response, 400, "looks like something went wrong", err)

    return
}

Server

import "services/controllers"

gorabbitmq.Server(gorabbitmq.Connection{"127.0.0.1", "5672", "account", "account", "account"}, gorabbitmq.QueueSetting{"account", true, false, false, false, nil}, gorabbitmq.ConsumeSetting{"", false, false, false, false, nil}, gorabbitmq.OtherSetting{"account", "60000", false, false, 18}, controllers.HandleRequest)

RPC Client

import "github.com/MrAndreID/gohelpers"

result, err := gorabbitmq.RPCClient("Andrea Adam", gorabbitmq.Connection{"127.0.0.1", "5672", "account", "account", "account"}, gorabbitmq.QueueSetting{"account", true, false, false, false, nil}, gorabbitmq.ConsumeSetting{"", true, false, false, false, nil}, gorabbitmq.OtherSetting{"account", "60000", false, false, 18})

if err != nil {
    gohelpers.HandleResponse(response, 400, "looks like something went wrong", err)

    return
}

RPC Server

import "services/routes"

gorabbitmq.RPCServer(gorabbitmq.Connection{"127.0.0.1", "5672", "account", "account", "account"}, gorabbitmq.QueueSetting{"account", true, false, false, false, nil}, gorabbitmq.QosSetting{1, 0, false}, gorabbitmq.ConsumeSetting{"", false, false, false, false, nil}, gorabbitmq.OtherSetting{"account", "60000", false, false, 18}, routes.HandleRequest)

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Andrea Adam - MrAndreID

License

MIT licensed. See the LICENSE file for details.

Official Documentation for Go Language

Documentation for Go Language can be found on the Go Language website.

More

Documentation can be found on https://go.dev/.