|
|
@ -5,28 +5,28 @@ |
|
|
|
package main |
|
|
|
package main |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
|
|
|
|
"encoding/json" |
|
|
|
"flag" |
|
|
|
"flag" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
|
|
|
|
"math" |
|
|
|
|
|
|
|
_ "net/http/pprof" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"os/signal" |
|
|
|
"os/signal" |
|
|
|
"syscall" |
|
|
|
"reflect" |
|
|
|
"runtime/debug" |
|
|
|
|
|
|
|
"time" |
|
|
|
|
|
|
|
"runtime" |
|
|
|
"runtime" |
|
|
|
"math" |
|
|
|
"runtime/debug" |
|
|
|
_ "net/http/pprof" |
|
|
|
|
|
|
|
"strings" |
|
|
|
|
|
|
|
"strconv" |
|
|
|
"strconv" |
|
|
|
"encoding/json" |
|
|
|
"strings" |
|
|
|
"reflect" |
|
|
|
"syscall" |
|
|
|
|
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"pkg/libs/log" |
|
|
|
|
|
|
|
"redis-shake" |
|
|
|
|
|
|
|
"redis-shake/base" |
|
|
|
"redis-shake/common" |
|
|
|
"redis-shake/common" |
|
|
|
"redis-shake/configure" |
|
|
|
"redis-shake/configure" |
|
|
|
"redis-shake/metric" |
|
|
|
"redis-shake/metric" |
|
|
|
"redis-shake" |
|
|
|
|
|
|
|
"redis-shake/base" |
|
|
|
|
|
|
|
"redis-shake/restful" |
|
|
|
"redis-shake/restful" |
|
|
|
"pkg/libs/log" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/gugemichael/nimo4go" |
|
|
|
"github.com/gugemichael/nimo4go" |
|
|
|
logRotate "gopkg.in/natefinch/lumberjack.v2" |
|
|
|
logRotate "gopkg.in/natefinch/lumberjack.v2" |
|
|
@ -83,7 +83,7 @@ func main() { |
|
|
|
utils.Welcome() |
|
|
|
utils.Welcome() |
|
|
|
utils.StartTime = fmt.Sprintf("%v", time.Now().Format(utils.GolangSecurityTime)) |
|
|
|
utils.StartTime = fmt.Sprintf("%v", time.Now().Format(utils.GolangSecurityTime)) |
|
|
|
|
|
|
|
|
|
|
|
if err = utils.WritePidById(conf.Options.Id); err != nil { |
|
|
|
if err = utils.WritePidById(conf.Options.Id, conf.Options.PidPath); err != nil { |
|
|
|
crash(fmt.Sprintf("write pid failed. %v", err), -5) |
|
|
|
crash(fmt.Sprintf("write pid failed. %v", err), -5) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|