MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / NewServerWithService

Function NewServerWithService

rpc/mux/wrapper.go:41–51  ·  view source on GitHub ↗

NewServerWithService returns a new Server and registers the Server.ServiceMap.

(serviceMap ServiceMap)

Source from the content-addressed store, hash-verified

39
40// NewServerWithService returns a new Server and registers the Server.ServiceMap.
41func NewServerWithService(serviceMap ServiceMap) (server *Server, err error) {
42 server = NewServer()
43 for k, v := range serviceMap {
44 err = server.RegisterService(k, v)
45 if err != nil {
46 log.Fatal(err)
47 return nil, err
48 }
49 }
50 return
51}
52
53// WithAcceptConnFunc resets the AcceptConn function of server.
54func (s *Server) WithAcceptConnFunc(f rpc.AcceptConn) *Server {

Callers 12

startMethod · 0.92
TestIncCounterFunction · 0.70
TestIncCounterSimpleArgsFunction · 0.70
TestETLSBugFunction · 0.70
TestEncPingFindNeighborFunction · 0.70
BenchmarkSessionPool_GetFunction · 0.70
TestNewSessionPoolFunction · 0.70
TestCaller_CallNodeFunction · 0.70
TestNewPersistentCallerFunction · 0.70

Calls 3

FatalFunction · 0.92
RegisterServiceMethod · 0.80
NewServerFunction · 0.70

Tested by 12

startMethod · 0.74
TestIncCounterFunction · 0.56
TestIncCounterSimpleArgsFunction · 0.56
TestETLSBugFunction · 0.56
TestEncPingFindNeighborFunction · 0.56
BenchmarkSessionPool_GetFunction · 0.56
TestNewSessionPoolFunction · 0.56
TestCaller_CallNodeFunction · 0.56
TestNewPersistentCallerFunction · 0.56