refactor command.go: commands do not rely on the etcdStore singleton. So we can seprate command into a package in the furture.

This commit is contained in:
Xiang Li
2013-10-09 20:34:00 -07:00
parent 4bf57537b5
commit 61899d62c5
2 changed files with 38 additions and 19 deletions

View File

@ -186,6 +186,11 @@ func (s *Server) Context() interface{} {
return s.context
}
// Retrieves the state machine passed into the constructor.
func (s *Server) StateMachine() StateMachine {
return s.stateMachine
}
// Retrieves the log path for the server.
func (s *Server) LogPath() string {
return path.Join(s.path, "log")