MCPcopy Create free account
hub / github.com/dim-an/cod / NewServer

Function NewServer

server/server.go:52–66  ·  view source on GitHub ↗
(cfg *Configuration)

Source from the content-addressed store, hash-verified

50}
51
52func NewServer(cfg *Configuration) (server Server, err error) {
53 serverImpl := &serverImpl{
54 configuration: cfg,
55 shellInfoMap: make(map[int]*shellInfo),
56 }
57 go serverImpl.waitAttach()
58 go serverImpl.trimLogs()
59
60 err = serverImpl.listen()
61 if err != nil {
62 return
63 }
64 server = serverImpl
65 return
66}
67
68type shellInfo struct {
69 pid int

Callers 1

daemonProcFunction · 0.92

Calls 3

waitAttachMethod · 0.95
trimLogsMethod · 0.95
listenMethod · 0.95

Tested by

no test coverage detected