Skip to content

Commit

Permalink
golang: Add ClientFunc option for simple consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
zaaksam committed Oct 30, 2024
1 parent 33caa01 commit 3c3ac5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions golang/simple_consumer_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ func newFuncSimpleConsumerOption(f func(*simpleConsumerOptions)) *funcSimpleCons
}
}

// WithClientFuncForSimpleConsumer returns a consumerOption that sets ClientFunc for consumer.
// Default is nameserver.New.
func WithClientFuncForSimpleConsumer(f NewClientFunc) SimpleConsumerOption {
return newFuncSimpleConsumerOption(func(o *simpleConsumerOptions) {
o.clientFunc = f
})
}

// WithTag returns a consumerOption that sets tag for consumer.
// Note: Default it uses *.
func WithSubscriptionExpressions(subscriptionExpressions map[string]*FilterExpression) SimpleConsumerOption {
Expand Down

0 comments on commit 3c3ac5b

Please sign in to comment.