update TCPKeepAliveInterval type to allow expression disable

This commit is contained in:
Shelikhoo 2021-05-06 15:33:35 +01:00
parent 7506395421
commit 31a7fb503c
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
3 changed files with 5 additions and 5 deletions

View File

@ -390,7 +390,7 @@ type SocketConfig struct {
TProxy string `json:"tproxy"`
AcceptProxyProtocol bool `json:"acceptProxyProtocol"`
TCPKeepAliveInterval uint32 `json:"tcpKeepAliveInterval"`
TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"`
}
// Build implements Buildable.

View File

@ -420,7 +420,7 @@ type SocketConfig struct {
BindAddress []byte `protobuf:"bytes,5,opt,name=bind_address,json=bindAddress,proto3" json:"bind_address,omitempty"`
BindPort uint32 `protobuf:"varint,6,opt,name=bind_port,json=bindPort,proto3" json:"bind_port,omitempty"`
AcceptProxyProtocol bool `protobuf:"varint,7,opt,name=accept_proxy_protocol,json=acceptProxyProtocol,proto3" json:"accept_proxy_protocol,omitempty"`
TcpKeepAliveInterval uint32 `protobuf:"varint,8,opt,name=tcp_keep_alive_interval,json=tcpKeepAliveInterval,proto3" json:"tcp_keep_alive_interval,omitempty"`
TcpKeepAliveInterval int32 `protobuf:"varint,8,opt,name=tcp_keep_alive_interval,json=tcpKeepAliveInterval,proto3" json:"tcp_keep_alive_interval,omitempty"`
}
func (x *SocketConfig) Reset() {
@ -504,7 +504,7 @@ func (x *SocketConfig) GetAcceptProxyProtocol() bool {
return false
}
func (x *SocketConfig) GetTcpKeepAliveInterval() uint32 {
func (x *SocketConfig) GetTcpKeepAliveInterval() int32 {
if x != nil {
return x.TcpKeepAliveInterval
}
@ -591,7 +591,7 @@ var file_transport_internet_config_proto_rawDesc = []byte{
0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x35, 0x0a, 0x17, 0x74, 0x63, 0x70, 0x5f,
0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x74, 0x63, 0x70, 0x4b, 0x65,
0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, 0x63, 0x70, 0x4b, 0x65,
0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22,
0x35, 0x0a, 0x10, 0x54, 0x43, 0x50, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x74,
0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x73, 0x49, 0x73, 0x10, 0x00, 0x12, 0x0a, 0x0a,

View File

@ -92,5 +92,5 @@ message SocketConfig {
bool accept_proxy_protocol = 7;
uint32 tcp_keep_alive_interval = 8;
int32 tcp_keep_alive_interval = 8;
}