qcat

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: MIT Imports: 12 Imported by: 0

README

qcat GoDoc

A utility for publishing and consuming data from an AMQP message broker

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultQueueName = `qcat`
View Source
var DefaultServerAddress = `:17684`

Functions

This section is empty.

Types

type AmqpClient

type AmqpClient struct {
	ID           string
	Host         string
	Port         int
	Username     string
	Password     string
	Vhost        string
	ExchangeName string
	RoutingKey   string
	QueueName    string
	Durable      bool
	Autodelete   bool
	Exclusive    bool
	Mandatory    bool
	Immediate    bool
	// contains filtered or unexported fields
}

func NewAmqpClient

func NewAmqpClient(uri string) (*AmqpClient, error)

func (*AmqpClient) Close

func (self *AmqpClient) Close() error

func (*AmqpClient) Connect

func (self *AmqpClient) Connect() error

func (*AmqpClient) Publish

func (self *AmqpClient) Publish(reader io.Reader, header MessageHeader) error

func (*AmqpClient) Subscribe

func (self *AmqpClient) Subscribe() (<-chan string, error)

func (*AmqpClient) SubscribeRaw

func (self *AmqpClient) SubscribeRaw() (<-chan amqp.Delivery, error)

type HttpServer

type HttpServer struct {
	BaseHeader MessageHeader
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(amqpClient *AmqpClient) *HttpServer

func (*HttpServer) ListenAndServe

func (self *HttpServer) ListenAndServe(address string) error

func (*HttpServer) Respond

func (self *HttpServer) Respond(w http.ResponseWriter, code int, payload interface{}, err error)

func (*HttpServer) ServeHTTP

func (self *HttpServer) ServeHTTP(w http.ResponseWriter, req *http.Request)

type MessageHeader

type MessageHeader struct {
	ContentType     string
	ContentEncoding string
	DeliveryMode    uint8  // Transient (0 or 1) or Persistent (2)
	Priority        uint8  // 0 to 9
	Expiration      string // message expiration spec
}

Directories

Path Synopsis
cmd
qcat command

Jump to

Keyboard shortcuts

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