service

package
v0.0.0-...-8b2440d Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MQ = NewMQ()

Functions

This section is empty.

Types

type MqService

type MqService struct {
}

func NewMQ

func NewMQ() *MqService

func (*MqService) CountConsumerMessages

func (s *MqService) CountConsumerMessages(consumerId string, messageName string) (int, error)

func (*MqService) DeclareConsumer

func (s *MqService) DeclareConsumer(consumerId string, messageName string, consumerRouteKey string) error

declare a consumer

func (*MqService) DeclareExchange

func (s *MqService) DeclareExchange(name string, mode string, durable bool) error

declare a Exchange

func (*MqService) DeleteExchange

func (s *MqService) DeleteExchange(name string) error

delete a exchange

func (*MqService) Publish

func (s *MqService) Publish(body string, exchangeName string, token string, routeKey string) (err error)

publish message to mq

func (*MqService) ReloadExchange

func (s *MqService) ReloadExchange(messageName string) error

reload one exchange

func (*MqService) ReloadExchanges

func (s *MqService) ReloadExchanges() error

reload RabbitMQ all exchanges

func (*MqService) StopAllConsumer

func (s *MqService) StopAllConsumer()

stop all consumer

func (*MqService) UnbindStopConsumer

func (s *MqService) UnbindStopConsumer(consumerId string, messageName string, consumerRouteKey string) error

stop consumer and unbind consumer to exchange

Jump to

Keyboard shortcuts

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