femq

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2019 License: MIT Imports: 8 Imported by: 0

README

femq

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMq

type BaseMq struct {
	MqConnection *MqConnection
	//channel cache
	ChannelContexts map[string]*ChannelContext
}

func GetConnection

func GetConnection(connection_type string, rabbitMQ_uri string) *BaseMq

func (*BaseMq) Consumer

func (bmq *BaseMq) Consumer(channelContext *ChannelContext, calllback func(string) bool) error

consumer message

func (*BaseMq) Init

func (bmq *BaseMq) Init()

func (*BaseMq) Publish

func (bmq *BaseMq) Publish(channelContext *ChannelContext, body string) error

publish message

type ChannelContext

type ChannelContext struct {
	Exchange     string
	ExchangeType string
	RoutingKey   string
	Reliable     bool
	Durable      bool
	ChannelId    string
	Channel      *amqp.Channel
}

type MqConnection

type MqConnection struct {
	Lock       sync.RWMutex
	Connection *amqp.Connection
	MqUri      string
}

Jump to

Keyboard shortcuts

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