Mismatch of the tutorial section of stringsvc example and its full code
What would you like?
I have noticed a couple of differences between the tutorial section of the stringsvc3 example and its full source code. It is worth mentioning the differences are about different imports, or different number of parameters of a particular function.
I was wondering which one is the most up to date one?
Can you enumerate some of them? I am happy to fix them.
Can you enumerate some of them? I am happy to fix them.
Thanks Peter!
- First of all, in the tutorial section of stringsvc3, there is no
contextwhile in the github code(ex:proxying.go) there is. It seems that the advance topic of the tutorial section is also included in stringsvc3. - Line 51 of the
proxying.goise = ratelimit.NewErroringLimiter(rate.NewLimiter(rate.Every(time.Second), qps))(e), but in the tutorial ise = kitratelimit.NewTokenBucketLimiter(jujuratelimit.NewBucketWithRate(float64(maxQPS), int64(maxQPS)))(e). Actually,jujuratelimitis not imported at all in the full code. - Line 44 of the the same file is
endpointer sd.FixedEndpointer, but in the tutorial issubscriber sd.FixedSubscriber. Thus in line 52, you can seeendpointer = append(endpointer, e), while in the tutorial issubscriber = append(subscriber, e)and of course the same mismatch in line 57 where there isbalancer := lb.NewRoundRobin(endpointer)but in the toturial isbalancer := lb.NewRoundRobin(subscriber)
can i work on this too? @peterbourgon
Yeah, go for it. Haven't gotten to it.
@peterbourgon great. where can I find the html files for https://gokit.io/examples/stringsvc.html#calling-other-services, and how do I know which file is more recent? should I just play around with them?
https://github.com/go-kit/go-kit.github.io