Documentation ¶
Overview ¶
@Time : 2019/4/28 11:06 @Author : kenny zhu @File : auth.go @Software: GoLand @Others:
@Time : 2019/4/28 10:50 @Author : kenny zhu @File : channel.go @Software: GoLand @Others:
@Time : 2019/4/28 10:52 @Author : kenny zhu @File : connection.go @Software: GoLand @Others:
@Time : 2019/4/28 10:44 @Author : kenny zhu @File : context.go @Software: GoLand @Others:
@Time : 2019/4/28 10:43 @Author : kenny zhu @File : options.go @Software: GoLand @Others:
@Time : 2019/4/28 10:39 @Author : kenny zhu @File : rabbitmq.go @Software: GoLand @Others:
Index ¶
- Variables
- func AckOnSuccess() broker.SubscribeOption
- func DeliveryMode(value uint8) broker.PublishOption
- func DurableExchange() broker.Option
- func DurableQueue() broker.SubscribeOption
- func Exchange(e string) broker.Option
- func ExternalAuth() broker.Option
- func Headers(h map[string]interface{}) broker.SubscribeOption
- func NewBroker(opts ...broker.Option) broker.Broker
- func PrefetchCount(c int) broker.Option
- func PrefetchGlobal() broker.Option
- func QueueArguments(h map[string]interface{}) broker.SubscribeOption
- func RequeueOnError() broker.SubscribeOption
- func SubscribeContext(ctx context.Context) broker.SubscribeOption
- type ExternalAuthentication
Constants ¶
This section is empty.
Variables ¶
var ( // exchange name DefaultExchange = exchange{ // contains filtered or unexported fields } DefaultRabbitURL = "amqp://guest:guest@127.0.0.1:5672" // for pre-fetch set, not used yet. DefaultPrefetchCount = 0 DefaultPrefetchGlobal = false )
Functions ¶
func AckOnSuccess ¶
func AckOnSuccess() broker.SubscribeOption
AckOnSuccess will automatically acknowledge messages when no error is returned
func DeliveryMode ¶
func DeliveryMode(value uint8) broker.PublishOption
DeliveryMode sets a delivery mode for publishing
func DurableExchange ¶
DurableExchange is an option to set the Exchange to be durable
func DurableQueue ¶
func DurableQueue() broker.SubscribeOption
DurableQueue creates a durable queue when subscribing.
func ExternalAuth ¶
func Headers ¶
func Headers(h map[string]interface{}) broker.SubscribeOption
Headers adds headers used by the headers exchange
func PrefetchGlobal ¶
PrefetchGlobal creates a durable queue when subscribing.
func QueueArguments ¶
func QueueArguments(h map[string]interface{}) broker.SubscribeOption
QueueArguments sets arguments for queue creation
func RequeueOnError ¶
func RequeueOnError() broker.SubscribeOption
RequeueOnError calls Nack(muliple:false, requeue:true) on amqp delivery when handler returns error
func SubscribeContext ¶
func SubscribeContext(ctx context.Context) broker.SubscribeOption
SubscribeContext set the context for broker.SubscribeOption
Types ¶
type ExternalAuthentication ¶
type ExternalAuthentication struct { }
fot auth key.
func (*ExternalAuthentication) Mechanism ¶
func (auth *ExternalAuthentication) Mechanism() string
func (*ExternalAuthentication) Response ¶
func (auth *ExternalAuthentication) Response() string