Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(50)

Delta Between Two Patch Sets: runserver.go

Issue 5787068: zookeeper: allow CreateServer to work in an existing directory.
Left Patch Set: Created 12 years ago
Right Patch Set: zookeeper: allow CreateServer to work in an existing directory. Created 12 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « [revision details] ('k') | server.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b