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

Function StartMirror

sqlchain/mirror/server.go:42–56  ·  view source on GitHub ↗

StartMirror starts the mirror server and start mirror database.

(database string, listenAddr string)

Source from the content-addressed store, hash-verified

40
41// StartMirror starts the mirror server and start mirror database.
42func StartMirror(database string, listenAddr string) (service *Service, err error) {
43 var server *mux.Server
44 if server, err = createServer(listenAddr); err != nil {
45 return
46 }
47
48 if service, err = NewService(database, server); err != nil {
49 return
50 }
51
52 // start mirror
53 err = service.start()
54
55 return
56}
57
58// StopMirror stops the mirror server.
59func StopMirror(service *Service) {

Callers 1

startMirrorServerFunction · 0.92

Calls 3

createServerFunction · 0.70
NewServiceFunction · 0.70
startMethod · 0.45

Tested by

no test coverage detected