mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #12702 from hexfusion/add-so
*: add support for socket options
This commit is contained in:
@@ -232,6 +232,9 @@ type Config struct {
|
||||
// before closing a non-responsive connection. 0 to disable.
|
||||
GRPCKeepAliveTimeout time.Duration `json:"grpc-keepalive-timeout"`
|
||||
|
||||
// SocketOpts are socket options passed to listener config.
|
||||
SocketOpts transport.SocketOpts
|
||||
|
||||
// PreVote is true to enable Raft Pre-Vote.
|
||||
// If enabled, Raft runs an additional election phase
|
||||
// to check whether it would get enough votes to win
|
||||
@@ -400,6 +403,8 @@ func NewConfig() *Config {
|
||||
GRPCKeepAliveInterval: DefaultGRPCKeepAliveInterval,
|
||||
GRPCKeepAliveTimeout: DefaultGRPCKeepAliveTimeout,
|
||||
|
||||
SocketOpts: transport.SocketOpts{},
|
||||
|
||||
TickMs: 100,
|
||||
ElectionMs: 1000,
|
||||
InitialElectionTickAdvance: true,
|
||||
|
||||
Reference in New Issue
Block a user