MCPcopy
hub / github.com/cubefs/cubefs / doStart

Function doStart

client/blockcache/bcache/service.go:87–111  ·  view source on GitHub ↗
(server common.Server, cfg *config.Config)

Source from the content-addressed store, hash-verified

85}
86
87func doStart(server common.Server, cfg *config.Config) (err error) {
88 s, ok := server.(*bcacheStore)
89 if !ok {
90 return errors.New("Invalid node Type!")
91 }
92 // parse the config file
93 var bconf *bcacheConfig
94 bconf, err = s.parserConf(cfg)
95 if err != nil {
96 err = errors.NewErrorf("block config parser error.")
97 panic(err)
98 }
99 // start bcache manage
100 bm := newBcacheManager(bconf)
101 if bm == nil {
102 err = errors.NewErrorf("block cache manager init fail.")
103 panic(err)
104 }
105 s.bcache = bm
106 s.conf = bconf
107
108 // start unix domain socket
109 err = s.startServer()
110 return
111}
112
113func doShutdown(server common.Server) {
114 s, ok := server.(*bcacheStore)

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
NewErrorfFunction · 0.92
newBcacheManagerFunction · 0.85
parserConfMethod · 0.80
startServerMethod · 0.45

Tested by

no test coverage detected