LEFT | RIGHT |
1 package zookeeper | 1 package zookeeper |
2 | 2 |
3 // This file defines methods on Server that deal with starting | 3 // This file defines methods on Server that deal with starting |
4 // and stopping the ZooKeeper service. They are independent of ZooKeeper | 4 // and stopping the ZooKeeper service. They are independent of ZooKeeper |
5 // itself, and may be factored out at a later date. | 5 // itself, and may be factored out at a later date. |
6 | 6 |
7 import ( | 7 import ( |
8 "errors" | 8 "errors" |
9 "fmt" | 9 "fmt" |
10 "io/ioutil" | 10 "io/ioutil" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // directory. Warning: this will destroy all data associated with the server. | 162 // directory. Warning: this will destroy all data associated with the server. |
163 func (srv *Server) Destroy() error { | 163 func (srv *Server) Destroy() error { |
164 if err := srv.Stop(); err != nil { | 164 if err := srv.Stop(); err != nil { |
165 return err | 165 return err |
166 } | 166 } |
167 if err := os.RemoveAll(srv.runDir); err != nil { | 167 if err := os.RemoveAll(srv.runDir); err != nil { |
168 return err | 168 return err |
169 } | 169 } |
170 return nil | 170 return nil |
171 } | 171 } |
LEFT | RIGHT |