Documentation
¶
Index ¶
Constants ¶
View Source
const ( Name = "MQ" Version = "0.1.0" ProtocolAmqp = "amqp" ProtocolMQTT = "mqtt" ProtocolMQTT_AWS = "mqtt-aws" // use AWS client )
Variables ¶
View Source
var ( ErrorNilInstance = errors.New("nil_instance_error") ErrorUnsupportedProtocol = errors.New("unsupported_protocol_error") ErrorMissingConfiguration = errors.New("missing_configuration_error") ErrorMissingConnection = errors.New("missing_connection_error") ErrorConnectionIsClosed = errors.New("closed_connection_error") )
Functions ¶
This section is empty.
Types ¶
type DriverConfig ¶
type IDriver ¶
type IDriver interface {
Close() error
Ping() (bool, error) // test connection
Info() string // printable properties
QueueDeclare(settings interface{}) (interface{}, error) // queue declare
QueueDelete(name string, args ...interface{}) (int, error) // queue delete
QueueInspect(name string) (interface{}, error) // queue inspect
QueuePurge(name string, args ...interface{}) (int, error) // queue clean
QueueBind(settings interface{}) error
QueueUnbind(settings interface{}) error
ExchangeDeclare(settings interface{}) error
ExchangeDelete(name string, args ...interface{}) error
ExchangeBind(settings interface{}) error
ExchangeUnbind(settings interface{}) error
RpcCommand(rpcChannel string, emitterSettings, listenerSettings interface{}, rawMessage interface{}, callback ListenerHandler, timeout time.Duration) error
NewEmitter(settings interface{}) (IEmitter, error) // send messages
NewListener(settings interface{}) (IListener, error) // consume messages
NotifyDisconnection(connectionCloseCallback func())
}
IDriver connection
type IListener ¶
type IListener interface {
Close() error
Listen(ListenerHandler) error
Join()
JoinTimeout(d time.Duration)
}
IListener listen/consume messages
type ListenerHandler ¶
type ListenerHandler func(message map[string]interface{})
Click to show internal directories.
Click to hide internal directories.