Browse Source

declare exchange before binding

pull/8/head
Miguel Bautista 5 years ago
parent
commit
3e6f1b7c78
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      consume.go

+ 8
- 8
consume.go View File

@ -189,30 +189,30 @@ func WithConsumeOptionsBindingExchangeKind(kind string) func(*ConsumeOptions) {
}
// WithConsumeOptionsBindingExchangeDurable returns a function that sets the binding exchange durable flag
func WithConsumeOptionsBindingExchangeDurable(durable bool) func(*ConsumeOptions) {
func WithConsumeOptionsBindingExchangeDurable() func(*ConsumeOptions) {
return func(options *ConsumeOptions) {
getBindingExchangeOptionsOrSetDefault(options).Durable = durable
getBindingExchangeOptionsOrSetDefault(options).Durable = true
}
}
// WithConsumeOptionsBindingExchangeAutoDelete returns a function that sets the binding exchange autoDelete flag
func WithConsumeOptionsBindingExchangeAutoDelete(autoDelete bool) func(*ConsumeOptions) {
func WithConsumeOptionsBindingExchangeAutoDelete() func(*ConsumeOptions) {
return func(options *ConsumeOptions) {
getBindingExchangeOptionsOrSetDefault(options).AutoDelete = autoDelete
getBindingExchangeOptionsOrSetDefault(options).AutoDelete = true
}
}
// WithConsumeOptionsBindingExchangeInternal returns a function that sets the binding exchange internal flag
func WithConsumeOptionsBindingExchangeInternal(internal bool) func(*ConsumeOptions) {
func WithConsumeOptionsBindingExchangeInternal() func(*ConsumeOptions) {
return func(options *ConsumeOptions) {
getBindingExchangeOptionsOrSetDefault(options).Internal = internal
getBindingExchangeOptionsOrSetDefault(options).Internal = true
}
}
// WithConsumeOptionsBindingExchangeNoWait returns a function that sets the binding exchange noWait flag
func WithConsumeOptionsBindingExchangeNoWait(noWait bool) func(*ConsumeOptions) {
func WithConsumeOptionsBindingExchangeNoWait() func(*ConsumeOptions) {
return func(options *ConsumeOptions) {
getBindingExchangeOptionsOrSetDefault(options).NoWait = noWait
getBindingExchangeOptionsOrSetDefault(options).NoWait = true
}
}


Loading…
Cancel
Save