Skip to content

Commit

Permalink
Merge pull request #25 from felixhao/conf_check
Browse files Browse the repository at this point in the history
add conf file pre check
  • Loading branch information
lintanghui authored Jul 18, 2018
2 parents 6b5142c + 9046bca commit ae10d9d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Version 1.1.0
1. add memcache binary protocol support.
2. add conf file check

## Version 1.0.0
1. compitable consist hash with twemproxy.
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Overlord [![Build Status](https://travis-ci.org/felixhao/overlord.svg?branch=master)](https://travis-ci.org/felixhao/overlord) [![GoDoc](http://godoc.org/github.com/felixhao/overlord/proxy?status.svg)](http://godoc.org/github.com/felixhao/overlord/proxy) [![codecov](https://codecov.io/gh/felixhao/overlord/branch/master/graph/badge.svg)](https://codecov.io/gh/felixhao/overlord)
# Overlord
[![Build Status](https://travis-ci.org/felixhao/overlord.svg?branch=master)](https://travis-ci.org/felixhao/overlord)
[![GoDoc](http://godoc.org/github.com/felixhao/overlord/proxy?status.svg)](http://godoc.org/github.com/felixhao/overlord/proxy)
[![codecov](https://codecov.io/gh/felixhao/overlord/branch/master/graph/badge.svg)](https://codecov.io/gh/felixhao/overlord)
[![Go Report Card](https://goreportcard.com/badge/github.com/felixhao/overlord)](https://goreportcard.com/report/github.com/felixhao/overlord)


Overlord is a proxy based high performance Memcached and Redis solution written in Go.
Expand Down
6 changes: 6 additions & 0 deletions cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (

var (
version bool
check bool
logStd bool
logFile string
logVl int
Expand Down Expand Up @@ -50,6 +51,7 @@ var usage = func() {

func init() {
flag.Usage = usage
flag.BoolVar(&check, "t", false, "conf file check")
flag.BoolVar(&version, "v", false, "print version.")
flag.BoolVar(&logStd, "std", false, "log will printing into stdout.")
flag.BoolVar(&debug, "debug", false, "debug model, will open stdout log. high priority than conf.debug.")
Expand All @@ -67,6 +69,10 @@ func main() {
fmt.Printf("overlord version %s\n", VERSION)
os.Exit(0)
}
if check {
parseConfig()
os.Exit(0)
}
c, ccs := parseConfig()
if initLog(c) {
defer log.Close()
Expand Down

0 comments on commit ae10d9d

Please sign in to comment.