MCPcopy
hub / github.com/grpc/grpc-go / NewTestServer

Function NewTestServer

interop/test_utils.go:700–705  ·  view source on GitHub ↗

NewTestServer creates a test server for test service. opts carries optional settings and does not need to be provided. If multiple opts are provided, only the first one is used.

(opts ...NewTestServerOptions)

Source from the content-addressed store, hash-verified

698// settings and does not need to be provided. If multiple opts are provided,
699// only the first one is used.
700func NewTestServer(opts ...NewTestServerOptions) testgrpc.TestServiceServer {
701 if len(opts) > 0 {
702 return &testServer{metricsRecorder: opts[0].MetricsRecorder}
703 }
704 return &testServer{}
705}
706
707func (s *testServer) EmptyCall(context.Context, *testpb.Empty) (*testpb.Empty, error) {
708 return new(testpb.Empty), nil

Callers 4

mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
startORCAServerFunction · 0.85

Calls

no outgoing calls

Tested by 1

startORCAServerFunction · 0.68