Documentation
¶
Overview ¶
Package testserver 提供基于 bufconn 的标准 gRPC Server 测试环境。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server 持有测试期间运行的标准 Server 和指向该服务的 ClientConn。
func (*Server) Close ¶
func (s *Server) Close()
Close 释放 ClientConn、Server 和 bufconn Listener,支持重复调用。
func (*Server) Conn ¶
func (s *Server) Conn() *grpc.ClientConn
Conn 返回连接到测试 Server 的 gRPC ClientConn。
Click to show internal directories.
Click to hide internal directories.