Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run 报错 #602

Closed
chenzhougit opened this issue Jun 30, 2020 · 3 comments
Closed

run 报错 #602

chenzhougit opened this issue Jun 30, 2020 · 3 comments

Comments

@chenzhougit
Copy link

chenzhougit commented Jun 30, 2020

github.com/go-kratos/kratos/pkg/net/rpc/warden/balancer/p2c

../vendor/github.com/go-kratos/kratos/pkg/net/rpc/warden/balancer/p2c/p2c.go:34:5: cannot use &p2cPickerBuilder literal (type *p2cPickerBuilder) as type base.PickerBuilder in assignment:
*p2cPickerBuilder does not implement base.PickerBuilder (wrong type for Build method)
have Build(map[resolver.Address]balancer.SubConn) balancer.Picker
want Build(base.PickerBuildInfo) balancer.Picker
../vendor/github.com/go-kratos/kratos/pkg/net/rpc/warden/balancer/p2c/p2c.go:35:5: cannot use &p2cPicker literal (type *p2cPicker) as type balancer.Picker in assignment:
*p2cPicker does not implement balancer.Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)
../vendor/github.com/go-kratos/kratos/pkg/net/rpc/warden/balancer/p2c/p2c.go:42:32: not enough arguments in call to base.NewBalancerBuilder
have (string, *p2cPickerBuilder)
want (string, base.PickerBuilder, base.Config)
../vendor/github.com/go-kratos/kratos/pkg/net/rpc/warden/balancer/p2c/p2c.go:144:2: cannot use p (type *p2cPicker) as type balancer.Picker in return argument:
*p2cPicker does not implement balancer.Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)

Compilation finished with exit code 2

代码实现接口有bug吗?

@chenzhougit
Copy link
Author

上面这个是本身框架代码实现的问题?

@chenzhougit
Copy link
Author

获取新版工具 go get -u github.com/go-kratos/kratos/tool/kratos@v0.5.0
重新执行,问题就解决了

@vincenthcui
Copy link
Contributor

@chenzhougit grpc 更新 API 接口后 kratos 没做同步,具体代码看 #622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants