depmake

package
v0.0.0-...-d841f61 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catch

func Catch(logger zerolog.Logger)

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 amqp.Connection) amqp.Channel

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

func (DependencyMaker) DepAMQPChannelSub

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

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

func (DependencyMaker) DepAmqpConnection

func (m DependencyMaker) DepAmqpConnection(logger zerolog.Logger, cfg config.CanopsisConf) amqp.Connection

DepAmqpConnection opens an amqp session.

func (DependencyMaker) DepAmqpSession

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

DepAmqpSession opens an amqp session.

func (DependencyMaker) DepConfig

func (m DependencyMaker) DepConfig() config.CanopsisConf

DepConfig gets a config from mongodb

func (DependencyMaker) DepInfluxSession

func (m DependencyMaker) DepInfluxSession() influxmod.Client

DepInfluxSession opens an influx session.

func (DependencyMaker) DepMongoClient

func (m DependencyMaker) DepMongoClient(cfg config.CanopsisConf) mongo.DbClient

DepMongoClient opens a mongo session.

func (DependencyMaker) DepRedisSession

func (m DependencyMaker) DepRedisSession(ctx context.Context, db int, logger zerolog.Logger, cfg config.CanopsisConf) *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