depmake

package
v0.0.0-...-4ecf446 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catch

func Catch()

Catch will recover from a panic, designed to be used with Panic().

func Panic

func Panic(msg string, err error)

Panic if err != nil, appending a message. Use this only in main programs.

Types

type DependencyMaker

type DependencyMaker struct {
}

DependencyMaker is just a handling struct and can be initialized empty. DO NOT use this type in any other place than a main package with a main() func, under any circumstances.

Every single function available MUST call depmake.Panic() instead of managing manually the error.

The idea behind that is simple: what you can't get makes you stop right now.

func (DependencyMaker) DepAMQPChannelPub

func (m DependencyMaker) DepAMQPChannelPub(session *amqpmod.Connection) *amqpmod.Channel

DepAMQPChannelPub opens a channel from a given session, to be used for publishing messages.

func (DependencyMaker) DepAMQPChannelSub

func (m DependencyMaker) DepAMQPChannelSub(session *amqpmod.Connection, prefetchCount, prefetchSize int) *amqpmod.Channel

DepAMQPChannelSub opens a channel from a given session, and apply Qos on it.

func (DependencyMaker) DepAmqpSession

func (m DependencyMaker) DepAmqpSession() *amqpmod.Connection

DepAmqpSession opens an amqp session.

func (DependencyMaker) DepInfluxSession

func (m DependencyMaker) DepInfluxSession() influxmod.Client

DepInfluxSession opens an influx session.

func (DependencyMaker) DepMongoSession

func (m DependencyMaker) DepMongoSession() *mgo.Session

DepMongoSession opens a mongo session.

func (DependencyMaker) DepRedisSession

func (m DependencyMaker) DepRedisSession(db int) *redismod.Client

DepRedisSession opens a redis session.

Jump to

Keyboard shortcuts

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