common

package
v0.0.0-...-e26c0a7 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugLevel bool

DebugLevel set to true will output extra information out workers flow.

Functions

func Info

func Info(args ...interface{})

func Log

func Log(args ...interface{})

Types

type MetricEntry

type MetricEntry struct {
	Username string    `json:"username"`
	Count    int64     `json:"count"`
	Metric   string    `json:"metric"`
	Time     time.Time `json:"time"`
}

MetricData

func MustUnmarshallFromJSON

func MustUnmarshallFromJSON(b []byte) MetricEntry

MustUnmarshallFromJSON builds a MetricData from JSON buffer

type ProcesorFunc

type ProcesorFunc func([]byte) bool

type RabbitMQConnector

type RabbitMQConnector struct {
	// contains filtered or unexported fields
}

func BuildRabbitMQConnector

func BuildRabbitMQConnector(host string, port int, user string, password string, exchange string) (*RabbitMQConnector, error)

func (*RabbitMQConnector) Close

func (m *RabbitMQConnector) Close() error

func (*RabbitMQConnector) Handle

func (m *RabbitMQConnector) Handle(queueName string, f ProcesorFunc) error

func (*RabbitMQConnector) Publish

func (m *RabbitMQConnector) Publish(b []byte) error

Jump to

Keyboard shortcuts

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