update some document
This commit is contained in:
parent
63159bee02
commit
099c4010d7
135
readme.txt
135
readme.txt
|
@ -2,3 +2,138 @@ cd cmd/server
|
|||
go build -o server
|
||||
cd cmd/gbt
|
||||
go build -o gbt
|
||||
|
||||
Add the following config files to the same directory as the compiled files:
|
||||
|
||||
gbt.conf like this:
|
||||
{
|
||||
"coin": "test",
|
||||
"alph": {
|
||||
"addr": "addr"
|
||||
},
|
||||
"rpc": {
|
||||
"host": "",
|
||||
"port": "",
|
||||
"apiHost": "",
|
||||
"apiPort": "",
|
||||
"apiKey": "",
|
||||
"testnet": "127.0.0.1:7229",
|
||||
"type": "mainnet",
|
||||
"user": "test",
|
||||
"pass": "test",
|
||||
"zmqsub": "tcp://127.0.0.1:21212",
|
||||
"timeout": 10000
|
||||
},
|
||||
"zmq": {
|
||||
"pub": "tcp://127.0.0.1:31354", -- to server.conf sub
|
||||
"sub": "tcp://127.0.0.1:31355" -- to server.conf pub
|
||||
},
|
||||
"redis": {
|
||||
"addr": "127.0.0.1:6379",
|
||||
"password": "",
|
||||
"db": 9
|
||||
},
|
||||
"profit": {
|
||||
"push": "tcp://127.0.0.1:21215"
|
||||
},
|
||||
"zap": {
|
||||
"level": "debug",
|
||||
"encoding": "json",
|
||||
"outputPaths": ["stdout", "/dev/null"],
|
||||
"errorOutputPaths": ["stdout"],
|
||||
"initialFields": {"gbt": "gbt"},
|
||||
"encoderConfig": {
|
||||
"messageKey": "message",
|
||||
"levelKey": "level",
|
||||
"levelEncoder": "lowercase"
|
||||
}
|
||||
},
|
||||
"logrotate": {
|
||||
"maxsize": 10,
|
||||
"maxbackups": 100,
|
||||
"maxage": 31,
|
||||
"compress": true
|
||||
}
|
||||
}
|
||||
|
||||
server.conf like this:
|
||||
{
|
||||
"coin": "test",
|
||||
"host": {
|
||||
"listen": "0.0.0.0:33390",
|
||||
"auth": true
|
||||
},
|
||||
"diff": {
|
||||
"start_diff": 1000,
|
||||
"diff_min":1,
|
||||
"diff_max":1048576,
|
||||
"diff_adjust_interval": 5,
|
||||
"diff_adjust_percentage": 0,
|
||||
"diff_adjust_time":600,
|
||||
"filter": "kalman",
|
||||
"dbg": false
|
||||
},
|
||||
"zmq": {
|
||||
"pub":"tcp://127.0.0.1:31355", -- to gbt.conf sub
|
||||
"sub":"tcp://127.0.0.1:31354" -- to gbt.conf pub
|
||||
},
|
||||
"redis": {
|
||||
"addr": "127.0.0.1:6379",
|
||||
"password": "",
|
||||
"db": 9
|
||||
},
|
||||
"zap": {
|
||||
"level": "debug",
|
||||
"encoding": "json",
|
||||
"outputPaths": ["stdout", "/dev/null"],
|
||||
"errorOutputPaths": ["stdout"],
|
||||
"initialFields": {"server": "server"},
|
||||
"encoderConfig": {
|
||||
"messageKey": "message",
|
||||
"levelKey": "level",
|
||||
"levelEncoder": "lowercase"
|
||||
}
|
||||
},
|
||||
"logrotate": {
|
||||
"maxsize": 10,
|
||||
"maxbackups": 100,
|
||||
"maxage": 31,
|
||||
"compress": true
|
||||
}
|
||||
}
|
||||
|
||||
db.conf like this:
|
||||
{
|
||||
"db": {
|
||||
"ip": "",
|
||||
"port": 3306,
|
||||
"username":"",
|
||||
"password":"",
|
||||
"dbname":""
|
||||
},
|
||||
"shares": {
|
||||
"ip": "",
|
||||
"port": ,
|
||||
"username":"",
|
||||
"password":"",
|
||||
"dbname":""
|
||||
},
|
||||
"zap": {
|
||||
"level": "debug",
|
||||
"encoding": "json",
|
||||
"outputPaths": ["stdout", "./logs/db.log"],
|
||||
"errorOutputPaths": ["stderr"],
|
||||
"initialFields": {"server": "server"},
|
||||
"encoderConfig": {
|
||||
"messageKey": "message",
|
||||
"levelKey": "level",
|
||||
"levelEncoder": "lowercase"
|
||||
}
|
||||
},
|
||||
"logrotate": {
|
||||
"maxsize": 10,
|
||||
"maxbackups": 100,
|
||||
"maxage": 31,
|
||||
"compress": true
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue