* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
* [fix] Do not send error when stream send eos header, just close the connection
* [fix] Do not overwrite the error in http client
---------
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
* services is shared between routines, when application change services returned by get function may lead to other routine set a changed services to cache
* services is shared between routines, when application change services returned by get function may lead to other routine set a changed services to cache
---------
Co-authored-by: Shuaihu Liu <shuaihu.liu@shopee.com>
* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
* [fix] Do not close the transport client twice in stream connection , the transport client is closed in the rpc codec
---------
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
Co-authored-by: Hunyadvári Péter <peter.hunyadvari@vcc.live>
We should use `(*regexp.Regexp).MatchString` instead of
`(*regexp.Regexp).Match([]byte(...))` when matching string to avoid
unnecessary `[]byte` conversions and reduce allocations.
func BenchmarkMatch(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := versionRe.Match([]byte("v1")); !match {
b.Fail()
}
}
}
func BenchmarkMatchString(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := versionRe.MatchString("v1"); !match {
b.Fail()
}
}
}
goos: linux
goarch: amd64
pkg: go-micro.dev/v4/api/handler/event
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
BenchmarkMatch-16 11430127 127.4 ns/op 2 B/op 1 allocs/op
BenchmarkMatchString-16 12220628 97.54 ns/op 0 B/op 0 allocs/op
PASS
ok go-micro.dev/v4/api/handler/event 3.822s
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>