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

Function NewServerWithService

rpc/wrapper.go:29–38  ·  view source on GitHub ↗

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

(serviceMap ServiceMap)

Source from the content-addressed store, hash-verified

27
28// NewServerWithService returns a new Server and registers the Server.ServiceMap.
29func NewServerWithService(serviceMap ServiceMap) (server *Server, err error) {
30 server = NewServer()
31 for k, v := range serviceMap {
32 err = server.RegisterService(k, v)
33 if err != nil {
34 return nil, err
35 }
36 }
37 return server, nil
38}
39
40// WithAcceptConnFunc resets the AcceptConn function of server.
41func (s *Server) WithAcceptConnFunc(f AcceptConn) *Server {

Callers 3

mainFunction · 0.92
mainFunction · 0.92
setupServerFunction · 0.70

Calls 2

RegisterServiceMethod · 0.80
NewServerFunction · 0.70

Tested by 1

setupServerFunction · 0.56