增加etcd初始化
This commit is contained in:
26
middleware/etcd/define.go
Normal file
26
middleware/etcd/define.go
Normal file
@ -0,0 +1,26 @@
|
||||
// Package etcd...
|
||||
//
|
||||
// Description : etcd...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-11-23 11:25 上午
|
||||
package etcd
|
||||
|
||||
import (
|
||||
"math"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
// DefaultDialTimeout 默认超时时间
|
||||
DefaultDialTimeout = 5 * time.Second
|
||||
// DefaultDialKeepAliveTime 默认ping时间
|
||||
DefaultDialKeepAliveTime = 3 * time.Second
|
||||
// DefaultDialKeepAliveTimeout ping之后等待响应的超时时间, 超时未响应, 连接将会断开
|
||||
DefaultDialKeepAliveTimeout = 5 * time.Second
|
||||
// DefaultMaxCallSendMsgSize 客户端请求体最大字节数, 默认 2M , 和etcd默认值保持一致
|
||||
DefaultMaxCallSendMsgSize = 2 * 1024 * 1024
|
||||
// DefaultMaxCallRecvMsgSize 客户端接受的响应题最大大小, 默认int32最大值, 和etcd默认值保持一致
|
||||
DefaultMaxCallRecvMsgSize = math.MaxInt32
|
||||
)
|
Reference in New Issue
Block a user