add unit test, fix interceptor bug

This commit is contained in:
kevin
2020-09-29 14:30:22 +08:00
parent e7d46aa6e2
commit 33a9db85c8
6 changed files with 87 additions and 3 deletions

View File

@@ -67,15 +67,15 @@ func NewServer(c RpcServerConf, register internal.RegisterFn) (*RpcServer, error
}
func (rs *RpcServer) AddOptions(options ...grpc.ServerOption) {
rs.AddOptions(options...)
rs.server.AddOptions(options...)
}
func (rs *RpcServer) AddStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) {
rs.AddStreamInterceptors(interceptors...)
rs.server.AddStreamInterceptors(interceptors...)
}
func (rs *RpcServer) AddUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) {
rs.AddUnaryInterceptors(interceptors...)
rs.server.AddUnaryInterceptors(interceptors...)
}
func (rs *RpcServer) Start() {