Documentation ¶
Index ¶
Constants ¶
View Source
const POLL_INTERVAL = 10 * time.Millisecond
View Source
const RECV_TIMEOUT = 1 * time.Second
View Source
const SEND_TIMEOUT = 1 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageQueueIFace ¶
type MessageQueueIFace interface { Connect(string) UseTopic(string) Send([]byte) Receive() []byte Close() }
func NewScalableMessageQueue ¶
func NewScalableMessageQueue() MessageQueueIFace
func NewSimpleMessageQueue ¶
func NewSimpleMessageQueue() MessageQueueIFace
type NetworkHandler ¶
type NetworkHandler struct {
// contains filtered or unexported fields
}
func NewNetworkHandler ¶
func NewNetworkHandler() *NetworkHandler
func (*NetworkHandler) GetErrorChan ¶
func (nh *NetworkHandler) GetErrorChan() <-chan error
func (*NetworkHandler) GetReceiverChannelFor ¶
func (nh *NetworkHandler) GetReceiverChannelFor(topicName string) <-chan []byte
func (*NetworkHandler) GetSenderChannelFor ¶
func (nh *NetworkHandler) GetSenderChannelFor(topicName string) chan<- []byte
func (*NetworkHandler) Shutdown ¶
func (nh *NetworkHandler) Shutdown()
type ScalableMessageQueue ¶
type ScalableMessageQueue struct {
// contains filtered or unexported fields
}
func (*ScalableMessageQueue) Close ¶
func (smq *ScalableMessageQueue) Close()
func (*ScalableMessageQueue) Connect ¶
func (smq *ScalableMessageQueue) Connect(url string)
func (*ScalableMessageQueue) Init ¶
func (smq *ScalableMessageQueue) Init()
func (*ScalableMessageQueue) Receive ¶
func (smq *ScalableMessageQueue) Receive() []byte
func (*ScalableMessageQueue) Send ¶
func (smq *ScalableMessageQueue) Send(message []byte)
func (*ScalableMessageQueue) UseTopic ¶
func (smq *ScalableMessageQueue) UseTopic(topicName string)
type SimpleMessageQueue ¶
type SimpleMessageQueue struct {
// contains filtered or unexported fields
}
func (*SimpleMessageQueue) Close ¶
func (mq *SimpleMessageQueue) Close()
func (*SimpleMessageQueue) Connect ¶
func (mq *SimpleMessageQueue) Connect(url string)
func (*SimpleMessageQueue) Init ¶
func (mq *SimpleMessageQueue) Init()
func (*SimpleMessageQueue) Receive ¶
func (mq *SimpleMessageQueue) Receive() []byte
TODO Handle timeout
func (*SimpleMessageQueue) Send ¶
func (mq *SimpleMessageQueue) Send(message []byte)
func (*SimpleMessageQueue) UseTopic ¶
func (mq *SimpleMessageQueue) UseTopic(topicName string)
Click to show internal directories.
Click to hide internal directories.