27 lines
826 B
Go
27 lines
826 B
Go
|
// 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
|
||
|
)
|