MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / NewServer

Function NewServer

cmd/cql-mysql-adapter/server.go:36–48  ·  view source on GitHub ↗

NewServer bind the service port and return a runnable adapter.

(listenAddr string, user string, password string)

Source from the content-addressed store, hash-verified

34
35// NewServer bind the service port and return a runnable adapter.
36func NewServer(listenAddr string, user string, password string) (s *Server, err error) {
37 s = &Server{
38 listenAddr: listenAddr,
39 mysqlUser: user,
40 mysqlPassword: password,
41 }
42
43 if s.listener, err = net.Listen("tcp", listenAddr); err != nil {
44 return
45 }
46
47 return
48}
49
50// Serve starts the server.
51func (s *Server) Serve() {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected