Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/armon/relay
/ functions
Functions
134 in github.com/armon/relay
⨍
Functions
134
◇
Types & classes
20
↓ 72 callers
Method
Close
()
broker/broker.go:8
↓ 30 callers
Function
New
New will create a new Relay that can be used to create new publishers or consumers. The caller should no longer modify the configuration once New is i
relay.go:86
↓ 23 callers
Function
AMQPHost
()
relay_test.go:22
↓ 22 callers
Function
CheckInteg
(t *testing.T)
relay_test.go:16
↓ 21 callers
Method
Consumer
(queue string)
broker/broker.go:9
↓ 20 callers
Method
Publish
(in interface{})
broker/broker.go:16
↓ 19 callers
Method
Publisher
(queue string)
broker/broker.go:10
↓ 14 callers
Method
Ack
()
broker/broker.go:25
↓ 14 callers
Method
Consume
(out interface{})
broker/broker.go:22
↓ 11 callers
Method
Max
Max returns the highest priority number.
pq/pq.go:85
↓ 11 callers
Function
NewPriorityQueue
NewPriorityQueue returns a new priority queue from which a consumer or producer at a given priority can be easily retrieved.
pq/pq.go:47
↓ 8 callers
Method
ConsumeTimeout
(out interface{}, timeout time.Duration)
broker/broker.go:24
↓ 8 callers
Method
Min
Min returns the lowest priority number. This is always 0.
pq/pq.go:90
↓ 8 callers
Method
Publish
Publish will publish a message at a given priority. The publisher is automatically closed afterward.
pq/pq.go:127
↓ 8 callers
Method
RetryBroker
RetryBroker returns a new retrying broker with the given settings.
retry.go:41
↓ 6 callers
Method
Close
Close will call a shutdown on all publishers we have used. By default, all publishers are kept open so that multiple calls to establish the sessions a
pq/pq.go:270
↓ 6 callers
Method
Consume
Consume is the public method for consuming data out of a priority queue. It will block until data is received, and returns the priority level of the c
pq/pq.go:251
↓ 6 callers
Method
ConsumeAck
(out interface{})
broker/broker.go:23
↓ 6 callers
Method
Nack
()
broker/broker.go:26
↓ 4 callers
Method
consumer
consumer is used to connect the consumer to the relay queue.
retry.go:94
↓ 4 callers
Method
consumer
consumer returns a new consumer with the indicated priority.
pq/pq.go:112
↓ 4 callers
Method
publisher
publisher returns a new publisher from the priority indicated by pri.
pq/pq.go:95
↓ 4 callers
Function
queueName
Converts the user input name into the actual name
util.go:12
↓ 4 callers
Function
testSendRecv
(t *testing.T, r *Relay)
relay_test.go:26
↓ 3 callers
Method
discard
discard is used to remove a broken consumer.
retry.go:117
↓ 3 callers
Function
randomStagger
randomStagger returns a randomized duration +/- 25% of the input.
retry_test.go:241
↓ 2 callers
Method
ConsumeTimeout
(out interface{}, timeout time.Duration)
inmem/inmem.go:99
↓ 2 callers
Method
ConsumerWithRoutingKey
ConsumerWithRoutingKey will return a new handle that can be used to consume messages from a given queue and routing key.
relay.go:266
↓ 2 callers
Function
IsDecodeFailure
IsDecodeFailure is a helper to determine if the error returned is a deserialization error.
consumer.go:176
↓ 2 callers
Method
PublisherWithRoutingKey
PublisherWithRoutingKey will return a new handle that can be used to publish messages to the given queue and routing key.
relay.go:321
↓ 2 callers
Function
channelName
Generates a channel name in the form of <host>.<rand> The random value is a hex encoding of 4 random bytes.
util.go:23
↓ 2 callers
Method
consume
consume consumes a message from the priority queue. This is a blocking call which will watch every queue at every priority until a message is received
pq/pq.go:156
↓ 2 callers
Method
declareQueue
Ensures the given queue exists and is bound to the exchange
relay.go:205
↓ 2 callers
Method
getChan
Used to get a new channel, possibly on a cached connection
relay.go:166
↓ 2 callers
Method
publisher
publisher is used to connect the publisher to the relay queue.
retry.go:259
↓ 2 callers
Function
queueName
queueName formats the name of a priority queue by appending its priority to the user-provided queue prefix.
pq/pq.go:80
↓ 1 callers
Method
Ack
Ack will send an acknowledgement to the server that the last message returned by Consume was processed. If EnableMultiAck is true, then all messages u
consumer.go:100
↓ 1 callers
Method
Ack
Ack marks message(s) as delivered.
retry.go:141
↓ 1 callers
Method
Ack
()
inmem/inmem.go:143
↓ 1 callers
Function
ConfigFromURI
ConfigFromURI attempts to parse the given AMQP URI according to the spec and return a relay config based on it. See http://www.rabbitmq.com/uri-spec.h
relay.go:59
↓ 1 callers
Method
Consume
Consume will consume the next available message. The message must be acknowledged with Ack() or Nack() before the next call to Consume unless EnableMu
consumer.go:80
↓ 1 callers
Method
Consume
Consume consumes a single message from the queue.
retry.go:182
↓ 1 callers
Method
ConsumeCancel
ConsumeCancel allows passing in a channel to signal that we should stop trying to consume a message. Internally this channel will be checked on a shor
pq/pq.go:258
↓ 1 callers
Method
ConsumeTimeout
Consume will consume the next available message or times out waiting. The message must be acknowledged with Ack() or Nack() before the next call to Co
consumer.go:27
↓ 1 callers
Method
ConsumeTimeout
ConsumeTimeout consumes a single message from the queue with an upper bound on the time spent waiting.
retry.go:188
↓ 1 callers
Method
Consumer
(q string)
inmem/inmem.go:48
↓ 1 callers
Method
ContentType
()
serialization.go:13
↓ 1 callers
Method
ContentType
()
serialization.go:21
↓ 1 callers
Method
ContentType
()
serialization.go:36
↓ 1 callers
Method
Nack
Nack will send a negative acknowledgement to the server that the last message returned by Consume was not processed and should be redelivered. If Enab
consumer.go:119
↓ 1 callers
Method
Nack
()
inmem/inmem.go:152
↓ 1 callers
Function
NewInmemBroker
()
inmem/inmem.go:36
↓ 1 callers
Method
Publisher
(q string)
inmem/inmem.go:56
↓ 1 callers
Method
RelayDecode
(io.Reader, interface{})
serialization.go:15
↓ 1 callers
Method
RelayDecode
(r io.Reader, o interface{})
serialization.go:28
↓ 1 callers
Method
RelayDecode
(r io.Reader, o interface{})
serialization.go:45
↓ 1 callers
Method
RelayEncode
(io.Writer, interface{})
serialization.go:14
↓ 1 callers
Method
RelayEncode
(w io.Writer, e interface{})
serialization.go:24
↓ 1 callers
Method
RelayEncode
(w io.Writer, e interface{})
serialization.go:40
↓ 1 callers
Method
discard
discard is used to remove a broken publisher.
retry.go:282
↓ 1 callers
Method
getConn
Used to get a new server connection
relay.go:126
↓ 1 callers
Method
watchConn
Watches for connection errors and closes the connection
relay.go:141
Method
Broker
Broker is used to wrap a Relay connection in one that is Broker compatible.
relay.go:376
Method
Close
Close will shutdown the Consumer. Any messages that are still in flight will be Nack'ed.
consumer.go:137
Method
Close
Close will shutdown the publisher
publisher.go:92
Method
Close
Close will shutdown the relay. It is best to first Close all the Consumer and Publishers, as this will close the underlying connections.
relay.go:230
Method
Close
()
relay.go:384
Method
Close
Close closes the broker.
retry.go:74
Method
Close
Close closes the consumer.
retry.go:132
Method
Close
Close closes the publisher.
retry.go:297
Method
Close
()
inmem/inmem.go:43
Method
Close
()
inmem/inmem.go:64
Method
Close
()
inmem/inmem.go:79
Method
Close
()
broker/broker.go:15
Method
Close
()
broker/broker.go:21
Method
Consume
(out interface{})
inmem/inmem.go:87
Method
ConsumeAck
ConsumeAck will consume the next message and acknowledge that the message has been received. This prevents the message from being redelivered, and no
consumer.go:87
Method
ConsumeAck
ConsumeAck is used to consume with automatic ack. The consume operation is able to be retried, but if a message is consumed and the acknowledgement fa
retry.go:174
Method
ConsumeAck
(out interface{})
inmem/inmem.go:91
Method
Consumer
Consumer will return a new handle that can be used to consume messages from a given queue.
relay.go:260
Method
Consumer
(q string)
relay.go:392
Method
Consumer
Consumer returns a new retrying broker.Consumer.
retry.go:63
Method
Nack
Nack sends message(s) back to the queue.
retry.go:155
Method
Publish
Publish will send the message to the server to be consumed
publisher.go:30
Method
Publish
Publish publishes a single message to the queue. If an error is encountered, the broker automatically tries to replace the underlying channel and subm
retry.go:310
Method
Publish
(in interface{})
inmem/inmem.go:69
Method
Publisher
Publisher will return a new handle that can be used to publish messages to the given queue.
relay.go:315
Method
Publisher
(q string)
relay.go:388
Method
Publisher
Publisher returns a new retrying broker.Publisher.
retry.go:52
Function
TestChannelName
(t *testing.T)
util_test.go:16
Function
TestCloseConsume
(t *testing.T)
relay_test.go:511
Function
TestClosePendingMsg
(t *testing.T)
relay_test.go:419
Function
TestClosePublish
(t *testing.T)
relay_test.go:542
Function
TestCloseRelayInUse
(t *testing.T)
relay_test.go:348
Function
TestConfigDefaults
(t *testing.T)
relay_test.go:81
Function
TestConfigFromURI
(t *testing.T)
relay_test.go:67
Function
TestConsumeTimeout
(t *testing.T)
relay_test.go:623
Function
TestConsumeWithoutAck
(t *testing.T)
relay_test.go:280
Function
TestConsumerMultiClose
(t *testing.T)
relay_test.go:174
Function
TestCustomExchange
(t *testing.T)
relay_test.go:145
next →
1–100 of 134, ranked by callers