[GitHub] [pulsar-client-go] xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for init (#68)

2019-11-05 Thread GitBox
xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for 
init (#68)
URL: https://github.com/apache/pulsar-client-go/pull/69#issuecomment-550118047
 
 
   > I've seen this patten in some other places for example helm 
https://github.com/helm/helm/blob/master/internal/experimental/registry/client.go
 and https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis. 
The main thing in these implementations are the config functions are scoped 
into their own package. This patch seems to be mixing config functions for 
three different configs with the same package. This is confusing to me.
   > 
   > One option would be to prefix everything to make it clear which config it 
belongs to.
   > ConsumerOptionsTopic()
   > ConsumerOptionsAckTimeout(1000)
   > Subscribe(name string, ConsuerOptionTopic(), ConsumerOptionsAckTimeout())
   > 
   > However this could quickly become more verbose than the standard way.
   > 
   > opts := ConsumerOptions{
   > topic: "my-topic",
   > ack: 1000,
   > }
   > Subscribe(name string, opts)
   > 
   > Thoughts?
   
   
   
   > I've seen this patten in some other places for example helm 
https://github.com/helm/helm/blob/master/internal/experimental/registry/client.go
 and https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis. 
The main thing in these implementations are the config functions are scoped 
into their own package. This patch seems to be mixing config functions for 
three different configs with the same package. This is confusing to me.
   > 
   > One option would be to prefix everything to make it clear which config it 
belongs to.
   > ConsumerOptionsTopic()
   > ConsumerOptionsAckTimeout(1000)
   > Subscribe(name string, ConsuerOptionTopic(), ConsumerOptionsAckTimeout())
   > 
   > However this could quickly become more verbose than the standard way.
   > 
   > opts := ConsumerOptions{
   > topic: "my-topic",
   > ack: 1000,
   > }
   > Subscribe(name string, opts)
   > 
   > Thoughts?
   
   @cckellogg I know ur question, It is a really big problem, I have no good 
solution for that now. maybe this pr should be pending for some time to find 
effective solution


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [pulsar-client-go] xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for init (#68)

2019-10-23 Thread GitBox
xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for 
init (#68)
URL: https://github.com/apache/pulsar-client-go/pull/69#issuecomment-545713574
 
 
   @sijie PTAL


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [pulsar-client-go] xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for init (#68)

2019-10-12 Thread GitBox
xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for 
init (#68)
URL: https://github.com/apache/pulsar-client-go/pull/69#issuecomment-541294712
 
 
   @wolfstudy @merlimat everything ok. review code pls, thx!


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [pulsar-client-go] xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for init (#68)

2019-10-11 Thread GitBox
xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for 
init (#68)
URL: https://github.com/apache/pulsar-client-go/pull/69#issuecomment-541287632
 
 
   > @xujianhai666 In Details->Console output 
https://builds.apache.org/job/pulsar_precommit_client_go/102/console
   > 
   > We can view the specific information of this `ci` output and the reason 
for the failure.
   
   @wolfstudy got it


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [pulsar-client-go] xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for init (#68)

2019-10-11 Thread GitBox
xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for 
init (#68)
URL: https://github.com/apache/pulsar-client-go/pull/69#issuecomment-541287618
 
 
   > @xujianhai666 In Details->Console output 
https://builds.apache.org/job/pulsar_precommit_client_go/102/console
   > 
   > We can view the specific information of this `ci` output and the reason 
for the failure.
   
   got it


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [pulsar-client-go] xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for init (#68)

2019-10-11 Thread GitBox
xujianhai666 commented on issue #69: [ISSUE #68][feat]add Option config for 
init (#68)
URL: https://github.com/apache/pulsar-client-go/pull/69#issuecomment-541100610
 
 
   @wolfstudy @merlimat who can help me with check failed? I can not find 
anything valuable for solving this failure. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services