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

Function createServer

sqlchain/mirror/server.go:28–39  ·  view source on GitHub ↗
(listenAddr string)

Source from the content-addressed store, hash-verified

26)
27
28func createServer(listenAddr string) (s *mux.Server, err error) {
29 var l net.Listener
30 if l, err = net.Listen("tcp", listenAddr); err != nil {
31 err = errors.Wrap(err, "listen rpc server failed")
32 return
33 }
34
35 s = mux.NewServer().WithAcceptConnFunc(rpc.AcceptRawConn)
36 s.SetListener(l)
37
38 return
39}
40
41// StartMirror starts the mirror server and start mirror database.
42func StartMirror(database string, listenAddr string) (service *Service, err error) {

Callers 1

StartMirrorFunction · 0.70

Calls 3

NewServerFunction · 0.92
SetListenerMethod · 0.80
WithAcceptConnFuncMethod · 0.45

Tested by

no test coverage detected