Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
getty
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
getty
Commits
a34641aa
Commit
a34641aa
authored
Oct 16, 2018
by
AlexStocks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update: use yaml config
parent
02003dc0
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
277 additions
and
252 deletions
+277
-252
config.go
micro/client/app/config.go
+1
-1
config.yml
micro/client/profiles/dev/config.yml
+2
-2
config.yml
micro/client/profiles/release/config.yml
+2
-2
config.yml
micro/client/profiles/test/config.yml
+2
-2
config.go
rpc/client/app/config.go
+29
-7
main.go
rpc/client/app/main.go
+18
-8
app.properties
rpc/client/assembly/common/app.properties
+1
-1
config.toml
rpc/client/profiles/dev/config.toml
+0
-41
config.yml
rpc/client/profiles/dev/config.yml
+41
-0
config.toml
rpc/client/profiles/release/config.toml
+0
-41
config.yml
rpc/client/profiles/release/config.yml
+41
-0
config.toml
rpc/client/profiles/test/config.toml
+0
-41
config.yml
rpc/client/profiles/test/config.yml
+41
-0
config.go
rpc/server/app/config.go
+17
-6
app.properties
rpc/server/assembly/common/app.properties
+1
-1
config.toml
rpc/server/profiles/dev/config.toml
+0
-33
config.yml
rpc/server/profiles/dev/config.yml
+27
-0
config.toml
rpc/server/profiles/release/config.toml
+0
-33
config.yml
rpc/server/profiles/release/config.yml
+27
-0
config.toml
rpc/server/profiles/test/config.toml
+0
-33
config.yml
rpc/server/profiles/test/config.yml
+27
-0
No files found.
micro/client/app/config.go
View file @
a34641aa
...
...
@@ -46,7 +46,7 @@ func initConf() {
return
// I know it is of no usage. Just Err Protection.
}
if
path
.
Ext
(
confFile
)
!=
".yml"
{
panic
(
fmt
.
Sprintf
(
"application configure file name{%v} suffix must be .
to
ml"
,
confFile
))
panic
(
fmt
.
Sprintf
(
"application configure file name{%v} suffix must be .
y
ml"
,
confFile
))
return
}
...
...
micro/client/profiles/dev/config.yml
View file @
a34641aa
...
...
@@ -33,7 +33,7 @@ core:
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-micro-
server
"
session_name
:
"
getty-micro-
client
"
registry
:
basic
:
...
...
@@ -42,4 +42,4 @@ registry:
# 与 registry 之间的 lease 时长
keepalive_timeout
:
10
root
:
"
/getty"
group
:
"
bj-yizhuang"
\ No newline at end of file
group
:
"
bj-yizhuang"
micro/client/profiles/release/config.yml
View file @
a34641aa
...
...
@@ -33,7 +33,7 @@ core:
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-micro-
server
"
session_name
:
"
getty-micro-
client
"
registry
:
basic
:
...
...
@@ -42,4 +42,4 @@ registry:
# 与 registry 之间的 lease 时长
keepalive_timeout
:
10
root
:
"
/getty"
group
:
"
bj-yizhuang"
\ No newline at end of file
group
:
"
bj-yizhuang"
micro/client/profiles/test/config.yml
View file @
a34641aa
...
...
@@ -33,7 +33,7 @@ core:
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-micro-
server
"
session_name
:
"
getty-micro-
client
"
registry
:
basic
:
...
...
@@ -42,4 +42,4 @@ registry:
# 与 registry 之间的 lease 时长
keepalive_timeout
:
10
root
:
"
/getty"
group
:
"
bj-yizhuang"
\ No newline at end of file
group
:
"
bj-yizhuang"
rpc/client/app/config.go
View file @
a34641aa
...
...
@@ -13,13 +13,14 @@ import (
"fmt"
"os"
"path"
"io/ioutil"
)
import
(
"github.com/AlexStocks/getty/rpc"
log
"github.com/AlexStocks/log4go"
jerrors
"github.com/juju/errors"
config
"github.com/koding/multiconfig
"
"gopkg.in/yaml.v2
"
)
const
(
...
...
@@ -27,8 +28,14 @@ const (
APP_LOG_CONF_FILE
=
"APP_LOG_CONF_FILE"
)
type
Config
struct
{
ServerHost
string
`default:"127.0.0.1" yaml:"server_host" json:"server_host,omitempty"`
ServerPort
int
`default:"1234" yaml:"server_port" json:"server_port,omitempty"`
rpc
.
ClientConfig
`yaml:"core" json:"core, omitempty"`
}
var
(
conf
*
rpc
.
Client
Config
conf
*
Config
)
func
initConf
()
{
...
...
@@ -38,17 +45,32 @@ func initConf() {
panic
(
fmt
.
Sprintf
(
"application configure file name is nil"
))
return
// I know it is of no usage. Just Err Protection.
}
if
path
.
Ext
(
confFile
)
!=
".
to
ml"
{
panic
(
fmt
.
Sprintf
(
"application configure file name{%v} suffix must be .
to
ml"
,
confFile
))
if
path
.
Ext
(
confFile
)
!=
".
y
ml"
{
panic
(
fmt
.
Sprintf
(
"application configure file name{%v} suffix must be .
y
ml"
,
confFile
))
return
}
conf
=
new
(
rpc
.
ClientConfig
)
config
.
MustLoadWithPath
(
confFile
,
conf
)
if
err
:=
conf
.
CheckValidity
();
err
!=
nil
{
conf
=
&
Config
{}
confFileStream
,
err
:=
ioutil
.
ReadFile
(
confFile
)
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"ioutil.ReadFile(file:%s) = error:%s"
,
confFile
,
jerrors
.
ErrorStack
(
err
)))
return
}
err
=
yaml
.
Unmarshal
(
confFileStream
,
conf
)
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"yaml.Unmarshal() = error:%s"
,
jerrors
.
ErrorStack
(
err
)))
return
}
fmt
.
Printf
(
"conf:%#v
\n
"
,
conf
)
if
err
=
conf
.
ClientConfig
.
CheckValidity
();
err
!=
nil
{
panic
(
jerrors
.
ErrorStack
(
err
))
return
}
if
conf
.
ServerPort
<
0
{
panic
(
"Config.ServerPort < 0"
)
return
}
// log
confFile
=
os
.
Getenv
(
APP_LOG_CONF_FILE
)
...
...
rpc/client/app/main.go
View file @
a34641aa
...
...
@@ -10,10 +10,12 @@
package
main
import
(
"net"
"net/http"
_
"net/http/pprof"
"os"
"os/signal"
"strconv"
"syscall"
"time"
)
...
...
@@ -66,7 +68,7 @@ func initProfiling() {
func
initClient
()
{
var
err
error
client
,
err
=
rpc
.
NewClient
(
conf
)
client
,
err
=
rpc
.
NewClient
(
&
conf
.
ClientConfig
)
if
err
!=
nil
{
panic
(
jerrors
.
ErrorStack
(
err
))
}
...
...
@@ -111,7 +113,10 @@ func testJSON() {
ts
:=
rpc_examples
.
TestService
{}
testReq
:=
rpc_examples
.
TestReq
{
"aaa"
,
"bbb"
,
"ccc"
}
testRsp
:=
rpc_examples
.
TestRsp
{}
err
:=
client
.
Call
(
rpc
.
CodecJson
,
"127.0.0.1:20000"
,
ts
.
Service
(),
"Test"
,
&
testReq
,
&
testRsp
)
addr
:=
net
.
JoinHostPort
(
conf
.
ServerHost
,
strconv
.
Itoa
(
conf
.
ServerPort
))
err
:=
client
.
Call
(
rpc
.
CodecJson
,
addr
,
ts
.
Service
(),
"Test"
,
&
testReq
,
&
testRsp
)
if
err
!=
nil
{
log
.
Error
(
"client.Call(Json, TestService::Test) = error:%s"
,
jerrors
.
ErrorStack
(
err
))
return
...
...
@@ -120,7 +125,7 @@ func testJSON() {
addReq
:=
rpc_examples
.
AddReq
{
1
,
10
}
addRsp
:=
rpc_examples
.
AddRsp
{}
err
=
client
.
Call
(
rpc
.
CodecJson
,
"127.0.0.1:10000"
,
ts
.
Service
(),
"Add"
,
&
addReq
,
&
addRsp
)
err
=
client
.
Call
(
rpc
.
CodecJson
,
addr
,
ts
.
Service
(),
"Add"
,
&
addReq
,
&
addRsp
)
if
err
!=
nil
{
log
.
Error
(
"client.Call(Json, TestService::Add) = error:%s"
,
jerrors
.
ErrorStack
(
err
))
return
...
...
@@ -129,7 +134,7 @@ func testJSON() {
errReq
:=
rpc_examples
.
ErrReq
{
1
}
errRsp
:=
rpc_examples
.
ErrRsp
{}
err
=
client
.
Call
(
rpc
.
CodecJson
,
"127.0.0.1:20000"
,
ts
.
Service
(),
"Err"
,
&
errReq
,
&
errRsp
)
err
=
client
.
Call
(
rpc
.
CodecJson
,
addr
,
ts
.
Service
(),
"Err"
,
&
errReq
,
&
errRsp
)
if
err
!=
nil
{
// error test case, this invocation should step into this branch.
log
.
Error
(
"client.Call(Json, TestService::Err) = error:%s"
,
jerrors
.
ErrorStack
(
err
))
...
...
@@ -142,7 +147,10 @@ func testProtobuf() {
ts
:=
rpc_examples
.
TestService
{}
testReq
:=
rpc_examples
.
TestReq
{
"aaa"
,
"bbb"
,
"ccc"
}
testRsp
:=
rpc_examples
.
TestRsp
{}
err
:=
client
.
Call
(
rpc
.
CodecProtobuf
,
"127.0.0.1:20000"
,
ts
.
Service
(),
"Test"
,
&
testReq
,
&
testRsp
)
addr
:=
net
.
JoinHostPort
(
conf
.
ServerHost
,
strconv
.
Itoa
(
conf
.
ServerPort
))
err
:=
client
.
Call
(
rpc
.
CodecProtobuf
,
addr
,
ts
.
Service
(),
"Test"
,
&
testReq
,
&
testRsp
)
if
err
!=
nil
{
log
.
Error
(
"client.Call(protobuf, TestService::Test) = error:%s"
,
jerrors
.
ErrorStack
(
err
))
return
...
...
@@ -151,7 +159,8 @@ func testProtobuf() {
addReq
:=
rpc_examples
.
AddReq
{
1
,
10
}
addRsp
:=
rpc_examples
.
AddRsp
{}
err
=
client
.
Call
(
rpc
.
CodecProtobuf
,
"127.0.0.1:10000"
,
ts
.
Service
(),
"Add"
,
&
addReq
,
&
addRsp
)
err
=
client
.
Call
(
rpc
.
CodecProtobuf
,
addr
,
ts
.
Service
(),
"Add"
,
&
addReq
,
&
addRsp
)
if
err
!=
nil
{
log
.
Error
(
"client.Call(protobuf, TestService::Add) = error:%s"
,
jerrors
.
ErrorStack
(
err
))
return
...
...
@@ -160,7 +169,8 @@ func testProtobuf() {
errReq
:=
rpc_examples
.
ErrReq
{
1
}
errRsp
:=
rpc_examples
.
ErrRsp
{}
err
=
client
.
Call
(
rpc
.
CodecProtobuf
,
"127.0.0.1:20000"
,
ts
.
Service
(),
"Err"
,
&
errReq
,
&
errRsp
)
err
=
client
.
Call
(
rpc
.
CodecProtobuf
,
addr
,
ts
.
Service
(),
"Err"
,
&
errReq
,
&
errRsp
)
if
err
!=
nil
{
// error test case, this invocation should step into this branch.
log
.
Error
(
"client.Call(protobuf, TestService::Err) = error:%s"
,
jerrors
.
ErrorStack
(
err
))
...
...
@@ -170,7 +180,7 @@ func testProtobuf() {
}
func
test
()
{
for
i
:=
0
;
i
<
5
;
i
++
{
for
i
:=
0
;
i
<
1
;
i
++
{
testJSON
()
testProtobuf
()
}
...
...
rpc/client/assembly/common/app.properties
View file @
a34641aa
...
...
@@ -12,6 +12,6 @@
export
TARGET_EXEC_NAME
=
"rpc_client"
export
BUILD_PACKAGE
=
"app"
export
TARGET_CONF_FILE
=
"conf/config.
to
ml"
export
TARGET_CONF_FILE
=
"conf/config.
y
ml"
export
TARGET_LOG_CONF_FILE
=
"conf/log.xml"
rpc/client/profiles/dev/config.toml
deleted
100644 → 0
View file @
02003dc0
# toml configure file
# toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写
AppName
=
"RPC-CLIENT"
# host
LocalHost
=
"127.0.0.1"
# server
ServerHost
=
"127.0.0.1"
ServerPort
=
10000
ProfilePort
=
10080
# connection pool
# 连接池连接数目
ConnectionNum
=
2
# session
# client与server之间连接的心跳周期
HeartbeatPeriod
=
"10s"
# client与server之间连接的超时时间
SessionTimeout
=
"20s"
# app fail fast
FailFastTimeout
=
"3s"
# tcp
[GettySessionParam]
CompressEncoding
=
true
TcpNoDelay
=
true
TcpKeepAlive
=
true
KeepAlivePeriod
=
"120s"
TcpRBufSize
=
262144
TcpWBufSize
=
65536
PkgRQSize
=
512
PkgWQSize
=
256
TcpReadTimeout
=
"1s"
TcpWriteTimeout
=
"5s"
WaitTimeout
=
"1s"
MaxMsgLen
=
1024
SessionName
=
"getty-rpc-client"
rpc/client/profiles/dev/config.yml
0 → 100644
View file @
a34641aa
# server
server_host
:
"
127.0.0.1"
server_port
:
10000
core
:
app_name
:
"
RPC-CLIENT"
host
:
"
127.0.0.1"
profile_port
:
20086
# client 与 server单个peer与peer之间连接数目
connection_number
:
2
# session
# client与server之间连接的心跳周期
heartbeat_period
:
"
10s"
# client与server之间连接的超时时间
session_timeout
:
"
20s"
# app fail fast
fail_fast_timeout
:
"
3s"
# connection pool
pool_size
:
64
pool_ttl
:
600
# tcp
getty_session_param
:
compress_encoding
:
true
tcp_no_delay
:
true
tcp_keep_alive
:
true
keep_alive_period
:
"
120s"
tcp_r_buf_size
:
262144
tcp_w_buf_size
:
65536
pkg_rq_size
:
1024
pkg_wq_size
:
512
tcp_read_timeout
:
"
1s"
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-micro-server"
rpc/client/profiles/release/config.toml
deleted
100644 → 0
View file @
02003dc0
# toml configure file
# toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写
AppName
=
"RPC-CLIENT"
# host
LocalHost
=
"127.0.0.1"
# server
ServerHost
=
"127.0.0.1"
ServerPort
=
10000
ProfilePort
=
10080
# connection pool
# 连接池连接数目
ConnectionNum
=
2
# session
# client与server之间连接的心跳周期
HeartbeatPeriod
=
"10s"
# client与server之间连接的超时时间
SessionTimeout
=
"20s"
# app fail fast
FailFastTimeout
=
"3s"
# tcp
[GettySessionParam]
CompressEncoding
=
true
TcpNoDelay
=
true
TcpKeepAlive
=
true
KeepAlivePeriod
=
"120s"
TcpRBufSize
=
262144
TcpWBufSize
=
65536
PkgRQSize
=
512
PkgWQSize
=
256
TcpReadTimeout
=
"1s"
TcpWriteTimeout
=
"5s"
WaitTimeout
=
"1s"
MaxMsgLen
=
1024
SessionName
=
"getty-rpc-client"
rpc/client/profiles/release/config.yml
0 → 100644
View file @
a34641aa
# server
server_host
:
"
127.0.0.1"
server_port
:
10000
core
:
app_name
:
"
RPC-CLIENT"
host
:
"
127.0.0.1"
profile_port
:
20086
# client 与 server单个peer与peer之间连接数目
connection_number
:
2
# session
# client与server之间连接的心跳周期
heartbeat_period
:
"
10s"
# client与server之间连接的超时时间
session_timeout
:
"
20s"
# app fail fast
fail_fast_timeout
:
"
3s"
# connection pool
pool_size
:
64
pool_ttl
:
600
# tcp
getty_session_param
:
compress_encoding
:
true
tcp_no_delay
:
true
tcp_keep_alive
:
true
keep_alive_period
:
"
120s"
tcp_r_buf_size
:
262144
tcp_w_buf_size
:
65536
pkg_rq_size
:
1024
pkg_wq_size
:
512
tcp_read_timeout
:
"
1s"
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-micro-server"
rpc/client/profiles/test/config.toml
deleted
100644 → 0
View file @
02003dc0
# toml configure file
# toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写
AppName
=
"RPC-CLIENT"
# host
LocalHost
=
"127.0.0.1"
# server
ServerHost
=
"127.0.0.1"
ServerPort
=
10000
ProfilePort
=
10080
# connection pool
# 连接池连接数目
ConnectionNum
=
2
# session
# client与server之间连接的心跳周期
HeartbeatPeriod
=
"10s"
# client与server之间连接的超时时间
SessionTimeout
=
"20s"
# app fail fast
FailFastTimeout
=
"3s"
# tcp
[GettySessionParam]
CompressEncoding
=
true
TcpNoDelay
=
true
TcpKeepAlive
=
true
KeepAlivePeriod
=
"120s"
TcpRBufSize
=
262144
TcpWBufSize
=
65536
PkgRQSize
=
512
PkgWQSize
=
256
TcpReadTimeout
=
"1s"
TcpWriteTimeout
=
"5s"
WaitTimeout
=
"1s"
MaxMsgLen
=
1024
SessionName
=
"getty-rpc-client"
rpc/client/profiles/test/config.yml
0 → 100644
View file @
a34641aa
# server
server_host
:
"
127.0.0.1"
server_port
:
10000
core
:
app_name
:
"
RPC-CLIENT"
host
:
"
127.0.0.1"
profile_port
:
20086
# client 与 server单个peer与peer之间连接数目
connection_number
:
2
# session
# client与server之间连接的心跳周期
heartbeat_period
:
"
10s"
# client与server之间连接的超时时间
session_timeout
:
"
20s"
# app fail fast
fail_fast_timeout
:
"
3s"
# connection pool
pool_size
:
64
pool_ttl
:
600
# tcp
getty_session_param
:
compress_encoding
:
true
tcp_no_delay
:
true
tcp_keep_alive
:
true
keep_alive_period
:
"
120s"
tcp_r_buf_size
:
262144
tcp_w_buf_size
:
65536
pkg_rq_size
:
1024
pkg_wq_size
:
512
tcp_read_timeout
:
"
1s"
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-micro-server"
rpc/server/app/config.go
View file @
a34641aa
...
...
@@ -11,6 +11,7 @@ package main
import
(
"fmt"
"io/ioutil"
"os"
"path"
)
...
...
@@ -19,7 +20,7 @@ import (
"github.com/AlexStocks/getty/rpc"
log
"github.com/AlexStocks/log4go"
jerrors
"github.com/juju/errors"
config
"github.com/koding/multiconfig
"
"gopkg.in/yaml.v2
"
)
const
(
...
...
@@ -38,17 +39,27 @@ func initConf() {
panic
(
fmt
.
Sprintf
(
"application configure file name is nil"
))
return
// I know it is of no usage. Just Err Protection.
}
if
path
.
Ext
(
confFile
)
!=
".
to
ml"
{
panic
(
fmt
.
Sprintf
(
"application configure file name{%v} suffix must be .
to
ml"
,
confFile
))
if
path
.
Ext
(
confFile
)
!=
".
y
ml"
{
panic
(
fmt
.
Sprintf
(
"application configure file name{%v} suffix must be .
y
ml"
,
confFile
))
return
}
conf
=
&
rpc
.
ServerConfig
{}
config
.
MustLoadWithPath
(
confFile
,
conf
)
if
err
:=
conf
.
CheckValidity
();
err
!=
nil
{
confFileStream
,
err
:=
ioutil
.
ReadFile
(
confFile
)
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"ioutil.ReadFile(file:%s) = error:%s"
,
confFile
,
jerrors
.
ErrorStack
(
err
)))
return
}
err
=
yaml
.
Unmarshal
(
confFileStream
,
conf
)
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"yaml.Unmarshal() = error:%s"
,
jerrors
.
ErrorStack
(
err
)))
return
}
if
err
=
conf
.
CheckValidity
();
err
!=
nil
{
panic
(
jerrors
.
ErrorStack
(
err
))
return
}
// log
confFile
=
os
.
Getenv
(
APP_LOG_CONF_FILE
)
if
confFile
==
""
{
...
...
rpc/server/assembly/common/app.properties
View file @
a34641aa
...
...
@@ -12,6 +12,6 @@
export
TARGET_EXEC_NAME
=
"rpc_server"
export
BUILD_PACKAGE
=
"app"
export
TARGET_CONF_FILE
=
"conf/config.
to
ml"
export
TARGET_CONF_FILE
=
"conf/config.
y
ml"
export
TARGET_LOG_CONF_FILE
=
"conf/log.xml"
rpc/server/profiles/dev/config.toml
deleted
100644 → 0
View file @
02003dc0
# toml configure file
# toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写
AppName
=
"RPC-SERVER"
Host
=
"127.0.0.1"
Ports
=
[
"10000"
,
"20000"
]
ProfilePort
=
10086
# client与server之间连接的超时时间
SessionTimeout
=
"20s"
SessionNumber
=
700
# app
FailFastTimeout
=
"3s"
# tcp
[GettySessionParam]
CompressEncoding
=
true
TcpNoDelay
=
true
TcpKeepAlive
=
true
KeepAlivePeriod
=
"120s"
TcpRBufSize
=
262144
TcpWBufSize
=
524288
PkgRQSize
=
1024
PkgWQSize
=
512
TcpReadTimeout
=
"1s"
TcpWriteTimeout
=
"5s"
WaitTimeout
=
"1s"
MaxMsgLen
=
1024
SessionName
=
"getty-rpc-server"
rpc/server/profiles/dev/config.yml
0 → 100644
View file @
a34641aa
app_name
:
"
RPC-SERVER"
host
:
"
127.0.0.1"
ports
:
[
"
10000"
,
"
20000"
]
profile_port
:
10086
# client与server之间连接的超时时间
session_timeout
:
"
20s"
session_number
:
700
fail_fast_timeout
:
"
3s"
# tcp
getty_session_param
:
compress_encoding
:
true
tcp_no_delay
:
true
tcp_keep_alive
:
true
keep_alive_period
:
"
120s"
tcp_r_buf_size
:
262144
tcp_w_buf_size
:
524288
pkg_rq_size
:
1024
pkg_wq_size
:
512
tcp_read_timeout
:
"
1s"
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-rpc-server"
rpc/server/profiles/release/config.toml
deleted
100644 → 0
View file @
02003dc0
# toml configure file
# toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写
AppName
=
"RPC-SERVER"
Host
=
"127.0.0.1"
Ports
=
[
"10000"
,
"20000"
]
ProfilePort
=
10086
# client与server之间连接的超时时间
SessionTimeout
=
"20s"
SessionNumber
=
700
# app
FailFastTimeout
=
"3s"
# tcp
[GettySessionParam]
CompressEncoding
=
true
TcpNoDelay
=
true
TcpKeepAlive
=
true
KeepAlivePeriod
=
"120s"
TcpRBufSize
=
262144
TcpWBufSize
=
524288
PkgRQSize
=
1024
PkgWQSize
=
512
TcpReadTimeout
=
"1s"
TcpWriteTimeout
=
"5s"
WaitTimeout
=
"1s"
MaxMsgLen
=
1024
SessionName
=
"getty-rpc-server"
rpc/server/profiles/release/config.yml
0 → 100644
View file @
a34641aa
app_name
:
"
RPC-SERVER"
host
:
"
127.0.0.1"
ports
:
[
"
10000"
,
"
20000"
]
profile_port
:
10086
# client与server之间连接的超时时间
session_timeout
:
"
20s"
session_number
:
700
fail_fast_timeout
:
"
3s"
# tcp
getty_session_param
:
compress_encoding
:
true
tcp_no_delay
:
true
tcp_keep_alive
:
true
keep_alive_period
:
"
120s"
tcp_r_buf_size
:
262144
tcp_w_buf_size
:
524288
pkg_rq_size
:
1024
pkg_wq_size
:
512
tcp_read_timeout
:
"
1s"
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-rpc-server"
rpc/server/profiles/test/config.toml
deleted
100644 → 0
View file @
02003dc0
# toml configure file
# toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写
AppName
=
"RPC-SERVER"
Host
=
"127.0.0.1"
Ports
=
[
"10000"
,
"20000"
]
ProfilePort
=
10086
# client与server之间连接的超时时间
SessionTimeout
=
"20s"
SessionNumber
=
700
# app
FailFastTimeout
=
"3s"
# tcp
[GettySessionParam]
CompressEncoding
=
true
TcpNoDelay
=
true
TcpKeepAlive
=
true
KeepAlivePeriod
=
"120s"
TcpRBufSize
=
262144
TcpWBufSize
=
524288
PkgRQSize
=
1024
PkgWQSize
=
512
TcpReadTimeout
=
"1s"
TcpWriteTimeout
=
"5s"
WaitTimeout
=
"1s"
MaxMsgLen
=
1024
SessionName
=
"getty-rpc-server"
rpc/server/profiles/test/config.yml
0 → 100644
View file @
a34641aa
app_name
:
"
RPC-SERVER"
host
:
"
127.0.0.1"
ports
:
[
"
10000"
,
"
20000"
]
profile_port
:
10086
# client与server之间连接的超时时间
session_timeout
:
"
20s"
session_number
:
700
fail_fast_timeout
:
"
3s"
# tcp
getty_session_param
:
compress_encoding
:
true
tcp_no_delay
:
true
tcp_keep_alive
:
true
keep_alive_period
:
"
120s"
tcp_r_buf_size
:
262144
tcp_w_buf_size
:
524288
pkg_rq_size
:
1024
pkg_wq_size
:
512
tcp_read_timeout
:
"
1s"
tcp_write_timeout
:
"
5s"
wait_timeout
:
"
1s"
max_msg_len
:
1024
session_name
:
"
getty-rpc-server"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment