working commit
This commit is contained in:
+21
-4
@@ -1,16 +1,12 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
//"io/ioutil"
|
||||
"os"
|
||||
"os/signal"
|
||||
"os/user"
|
||||
//"os/user"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
//"sync"
|
||||
"syscall"
|
||||
//"time"
|
||||
|
||||
"mstore/app/config"
|
||||
"mstore/app/handler"
|
||||
@@ -42,6 +38,27 @@ func (srv *Server) Handler() *handler.Handler {
|
||||
return srv.hand
|
||||
}
|
||||
|
||||
func (srv *Server) Service() *service.Service {
|
||||
return srv.svc
|
||||
}
|
||||
|
||||
func (srv *Server) SetLogdir(dir string) {
|
||||
srv.conf.Logpath = dir
|
||||
}
|
||||
|
||||
func (srv *Server) SetRundir(dir string) {
|
||||
srv.conf.Runpath = dir
|
||||
}
|
||||
|
||||
func (srv *Server) SetDatadir(dir string) {
|
||||
srv.conf.Database.Basepath = dir
|
||||
srv.conf.Storage.Basepath = dir
|
||||
}
|
||||
|
||||
func (srv *Server) SetPort(port int64) {
|
||||
srv.conf.Service.Port = port
|
||||
}
|
||||
|
||||
func (srv *Server) Configure() error {
|
||||
var err error
|
||||
srv.logg.Infof("Configuration server")
|
||||
|
||||
Reference in New Issue
Block a user