goutils

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

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

Go to latest
Published: Nov 23, 2017 License: MIT Imports: 0 Imported by: 0

README

go-utils

A collection of utilities function for Go used across Conversio. No reason this can't be open source right? :-)

Build Status codecov

Usage

import "github.com/getconversio/go-utils/services/amqp"

func StartListening() {
	amqp.HandleFunc(
		"myqueue",     // Queue name
		"myexchange",  // Exchange name
		"myrouting",   // Routing key
		new(mystruct),
		func(msg interface{}, headers aq.Table) error {
			doSomething(*msg.(*mystruct))
			return nil
		})
}

Testing

Basic testing:

$ docker-compose run --rm dev

Testing the package is the default command for the dev container. To create a coverage profile:

$ docker-compose run --rm dev ./test.sh cover

Documentation

Overview

Package goutils consists of a collection of commonly used services and tools across the repositories of Conversio. Each subdirectory is more-or-less self-contained and has its own documentation.

Directories

Path Synopsis
db
bq
Package bq provides a wrapper for Google's BigQuery library as well as general setup of the BigQuery client and streaming inserts usign bqstreamer.
Package bq provides a wrapper for Google's BigQuery library as well as general setup of the BigQuery client and streaming inserts usign bqstreamer.
services
log
oxr

Jump to

Keyboard shortcuts

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