trpc-group / trpc-go

A pluggable, high-performance RPC framework written in golang
Other
743 stars 85 forks source link

transport: the registered server transport for go-net should be able to work for stream #102

Closed WineChord closed 8 months ago

WineChord commented 8 months ago

What version of tRPC-Go are you using?

v1.0.0

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY='trpc.group,github.com'
GONOSUMDB='trpc.group,github.com'
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE='trpc.group'
GOPROXY='https://wineguo:ObGgNsCG@goproxy.woa.com'
GOROOT='/root/sdk/go1.21.2'
GOSUMDB='sum.woa.com+643d7a06+Ac5f5VOC4N8NUXdmhbm8pZSXIWfhek5JSmWdWrq7pLX4'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/root/sdk/go1.21.2/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.2'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/data/projects/github/trpc-go/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1451082008=/tmp/go-build -gno-record-gcc-switches'

What did you do?

use helloworld.proto

run

trpc create -p helloworld.proto -o out

edit the out/trpc_go.yaml file, add transport: go-net to every service, then

$ cd out 
$ go run .
// ...
2023-10-18 10:50:05.779 DEBUG   maxprocs/maxprocs.go:47 maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined
panic: HelloWorldServerStreamService register error:server StreamTransport is not implemented

goroutine 1 [running]:
trpc.group/examples/helloworld.RegisterHelloWorldServerStreamService({0xd4afb0?, 0xc0004564c0?}, {0xd44000?, 0x12d5480?})
        /data/projects/github/trpc-cmdline/testcase/create/1-without-import/out/stub/trpc.group/examples/helloworld/helloworld.trpc.go:133 +0x9f
main.main()
        /data/projects/github/trpc-cmdline/testcase/create/1-without-import/out/main.go:14 +0xb6
exit status 2

What did you expect to see?

no panic

What did you see instead?

panic