Skip to content

autokz/golem-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golem-client

RabbitMQ client to put message into queue.

Init publisher to send messages:

package main

func main() {
	err := golem.InitPublisher(
		"golemClientTest",
		&golem.Params{
			User:     "rabbit",
			Password: "password",
			Host:     "localhost",
			Port:     5672,
		},
		&golem.Exchange{
			Name: "golemClientTest",
			Kind:  golem.KindFanout,
			AutoDelete: true,
		},
	)
	if err != nil {
		log.Fatalln(err)
	}
}

Call the necessary function in your code:

    golem.Info("test info message", 100)
    
    golem.Error("test error message", 409)
    
    golem.Fatal("test fatal message")

Use Recover function to send panic messages and stack traces:

    defer golem.Recover()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages