client

package
v0.0.0-...-70ad6e6 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: EPL-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Redis

func Redis() *redis.Client

Types

type ExchangeEntity

type ExchangeEntity struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Durable    bool   `json:"durable"`
	AutoDelete bool   `json:"autodelete"`
	NoWait     bool   `json:"nowait"`
}

type MessageEntity

type MessageEntity struct {
	Exchange     string `json:"exchange"`
	Key          string `json:"key"`
	DeliveryMode uint8  `json:"deliverymode"`
	Priority     uint8  `json:"priority"`
	Body         string `json:"body"`
}

MessageEntity Entity for HTTP Request Body: Message/Exchange/Queue/QueueBind JSON Input

type MqController

type MqController struct{}

func (*MqController) ExchangeHandler

func (m *MqController) ExchangeHandler(w http.ResponseWriter, r *http.Request)

func (*MqController) PublishHandler

func (m *MqController) PublishHandler(w http.ResponseWriter, r *http.Request)

func (*MqController) QueueBindHandler

func (m *MqController) QueueBindHandler(w http.ResponseWriter, r *http.Request)

func (*MqController) QueueHandler

func (m *MqController) QueueHandler(w http.ResponseWriter, r *http.Request)

QueueHandler HTTP Handlers

type QueueBindEntity

type QueueBindEntity struct {
	Queue    string   `json:"queue"`
	Exchange string   `json:"exchange"`
	NoWait   bool     `json:"nowait"`
	Keys     []string `json:"keys"` // bind/routing keys
}

type QueueEntity

type QueueEntity struct {
	Name       string `json:"name"`
	Durable    bool   `json:"durable"`
	AutoDelete bool   `json:"autodelete"`
	Exclusive  bool   `json:"exclusive"`
	NoWait     bool   `json:"nowait"`
}

type RabbitMQ

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

RabbitMQ Operate Wrapper

func (*RabbitMQ) BindQueue

func (r *RabbitMQ) BindQueue(queue, exchange string, keys []string, nowait bool) (err error)

func (*RabbitMQ) Close

func (r *RabbitMQ) Close() (err error)

func (*RabbitMQ) Connect

func (r *RabbitMQ) Connect() (err error)

func (*RabbitMQ) ConsumeQueue

func (r *RabbitMQ) ConsumeQueue(queue string, message chan []byte) (err error)

func (*RabbitMQ) DeclareExchange

func (r *RabbitMQ) DeclareExchange(name, typ string, durable, autodelete, nowait bool) (err error)

func (*RabbitMQ) DeclareQueue

func (r *RabbitMQ) DeclareQueue(name string, durable, autodelete, exclusive, nowait bool) (err error)

func (*RabbitMQ) DeleteExchange

func (r *RabbitMQ) DeleteExchange(name string) (err error)

func (*RabbitMQ) DeleteQueue

func (r *RabbitMQ) DeleteQueue(name string) (err error)

func (*RabbitMQ) Publish

func (r *RabbitMQ) Publish(exchange, key string, deliverymode, priority uint8, body string) (err error)

func (*RabbitMQ) UnBindQueue

func (r *RabbitMQ) UnBindQueue(queue, exchange string, keys []string) (err error)

Jump to

Keyboard shortcuts

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