Documentation
¶
Overview ¶
Package grpctest runs a small in-process gRPC server for tests in other packages. It serves the standard health service, which has real message types, and it can offer server reflection or not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// Addr is host:port.
Addr string
// contains filtered or unexported fields
}
Server is a running test server.
func Start ¶
Start serves grpc.health.v1.Health on localhost. The service "up" is SERVING and "down" is NOT_SERVING. The empty name is SERVING. Any other name answers NotFound. With reflection true the server also offers server reflection. The server stops when the test ends.
func StartAlphaOnly ¶
StartAlphaOnly is Start with reflection, but only the older v1alpha protocol, as some servers still offer.
Click to show internal directories.
Click to hide internal directories.