How to use?

Get package:

go get github.com/official-stallion/stallion@latest

Now to set the client up you need to create a stallion server. Stallion server is the message broker server.

Create server in Golang

package main

import "github.com/official-stallion/stallion"

func main() {
	if err := stallion.NewServer(":9090"); err != nil {
		panic(err)
	}
}

Create a server with docker

Check the docker documentation for stallion server.

Creating a server with Auth

You can create a Stallion server with username and password for Auth.

package main

import "github.com/official-stallion/stallion"

func main() {
	if err := stallion.NewServer(":9090", "root", "Pa$$word"); err != nil {
		panic(err)
	}
}