diff --git a/models/check_definition.pb.go b/models/check_definition.pb.go index bded6441..33925422 100644 --- a/models/check_definition.pb.go +++ b/models/check_definition.pb.go @@ -132,6 +132,7 @@ func (m *Check) GetHttpCheck() *HTTPCheck { type TCPCheck struct { Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port"` ConnectTimeoutMs uint64 `protobuf:"varint,2,opt,name=connect_timeout_ms,json=connectTimeoutMs,proto3" json:"connect_timeout_ms,omitempty"` + IntervalMs uint64 `protobuf:"varint,3,opt,name=interval_ms,json=intervalMs,proto3" json:"interval_ms,omitempty"` } func (m *TCPCheck) Reset() { *m = TCPCheck{} } @@ -180,10 +181,18 @@ func (m *TCPCheck) GetConnectTimeoutMs() uint64 { return 0 } +func (m *TCPCheck) GetIntervalMs() uint64 { + if m != nil { + return m.IntervalMs + } + return 0 +} + type HTTPCheck struct { Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port"` RequestTimeoutMs uint64 `protobuf:"varint,2,opt,name=request_timeout_ms,json=requestTimeoutMs,proto3" json:"request_timeout_ms,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path"` + IntervalMs uint64 `protobuf:"varint,4,opt,name=interval_ms,json=intervalMs,proto3" json:"interval_ms,omitempty"` } func (m *HTTPCheck) Reset() { *m = HTTPCheck{} } @@ -239,6 +248,13 @@ func (m *HTTPCheck) GetPath() string { return "" } +func (m *HTTPCheck) GetIntervalMs() uint64 { + if m != nil { + return m.IntervalMs + } + return 0 +} + func init() { proto.RegisterType((*CheckDefinition)(nil), "models.CheckDefinition") proto.RegisterType((*Check)(nil), "models.Check") @@ -249,30 +265,32 @@ func init() { func init() { proto.RegisterFile("check_definition.proto", fileDescriptor_048a62b88ce7913d) } var fileDescriptor_048a62b88ce7913d = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xc1, 0x6a, 0xea, 0x40, -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, 0x1c, 0xb6, 0xcb, 0x06, 0x67, 0x7c, 0x9f, 0x97, - 0x34, 0x24, 0x8b, 0x73, 0xfb, 0x25, 0xc6, 0xbe, 0x94, 0xa5, 0xbf, 0x02, 0xfe, 0xff, 0xa5, 0xff, - 0xd6, 0x71, 0x8a, 0x80, 0x7e, 0x30, 0xc1, 0x6a, 0x3e, 0xe2, 0x46, 0xc9, 0x21, 0x67, 0xb8, 0x16, - 0x8b, 0x44, 0x42, 0x4f, 0x6b, 0xd4, 0xd8, 0xad, 0x3b, 0x70, 0xdb, 0x30, 0xc9, 0x05, 0x26, 0x4c, - 0x44, 0x11, 0x67, 0xd2, 0x95, 0x41, 0xc8, 0x45, 0x26, 0xdd, 0x30, 0x85, 0x8e, 0x9a, 0xdd, 0x2e, - 0x14, 0x27, 0x17, 0xee, 0x52, 0x33, 0xc3, 0xfa, 0xb1, 0xef, 0x77, 0x70, 0xc2, 0x9f, 0x33, 0x9e, - 0xfe, 0x04, 0x2e, 0x94, 0x23, 0x18, 0x58, 0x13, 0xe9, 0x1b, 0x55, 0xf8, 0x87, 0x39, 0x6b, 0x22, - 0x7d, 0x1b, 0xe6, 0xe8, 0x7a, 0xb9, 0xa1, 0xda, 0x6a, 0x43, 0xb5, 0xfd, 0x86, 0xa2, 0x17, 0x45, - 0xd1, 0x9b, 0xa2, 0xe8, 0x5d, 0x51, 0xb4, 0x54, 0x14, 0x7d, 0x28, 0x8a, 0x3e, 0x15, 0xd5, 0xf6, - 0x8a, 0xa2, 0xd7, 0x2d, 0xd5, 0x96, 0x5b, 0xaa, 0xad, 0xb6, 0x54, 0x9b, 0xd6, 0xe1, 0x79, 0xaf, - 0xbe, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x69, 0xc1, 0x97, 0x2f, 0x02, 0x00, 0x00, + // 393 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x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 0xab, 0x92, 0x85, 0x16, 0xa4, 0x74, 0x50, 0x0f, 0xf5, 0x9b, 0xa3, 0x76, 0x49, 0x30, + 0x27, 0x17, 0x39, 0xa4, 0x21, 0x59, 0x98, 0xdb, 0xff, 0x62, 0xec, 0x48, 0x59, 0xfa, 0x2b, 0xe0, + 0xff, 0x5e, 0xfa, 0xcf, 0x4d, 0xb3, 0x58, 0x50, 0x33, 0x13, 0x94, 0xda, 0x2d, 0x6e, 0x94, 0x39, + 0xe4, 0x17, 0xae, 0x85, 0x22, 0x92, 0xc0, 0x69, 0x8d, 0x1b, 0xfb, 0x4d, 0x17, 0x7a, 0x03, 0x5e, + 0xf2, 0x07, 0x13, 0x26, 0x82, 0x80, 0x33, 0x69, 0x49, 0xd7, 0xe7, 0x22, 0x91, 0x96, 0x1f, 0x03, + 0xa3, 0x66, 0xb4, 0x0b, 0xc5, 0xcc, 0x85, 0x69, 0x4c, 0xba, 0xb8, 0xe9, 0x06, 0x92, 0x47, 0x37, + 0x33, 0x2f, 0xb3, 0x55, 0xc1, 0x86, 0xcb, 0xd1, 0x34, 0xd6, 0x1e, 0x10, 0x56, 0x8f, 0x17, 0x7d, + 0x8e, 0x8e, 0xf8, 0x75, 0xc2, 0xe3, 0x8f, 0xd0, 0x85, 0xf2, 0x86, 0xce, 0xb2, 0x66, 0xd2, 0x01, + 0xa6, 0x5a, 0x64, 0xcd, 0xa4, 0x63, 0xc0, 0x7b, 0x7a, 0x58, 0xed, 0xf4, 0xb0, 0xf1, 0xff, 0xd5, + 0x96, 0x2a, 0xeb, 0x2d, 0x55, 0x0e, 0x5b, 0x8a, 0xee, 0x52, 0x8a, 0x1e, 0x53, 0x8a, 0x9e, 0x52, + 0x8a, 0x56, 0x29, 0x45, 0xcf, 0x29, 0x45, 0x2f, 0x29, 0x55, 0x0e, 0x29, 0x45, 0xf7, 0x3b, 0xaa, + 0xac, 0x76, 0x54, 0x59, 0xef, 0xa8, 0x32, 0xaf, 0xc3, 0x0f, 0xf9, 0xf7, 0x1a, 0x00, 0x00, 0xff, + 0xff, 0x95, 0x2c, 0x15, 0x9b, 0x72, 0x02, 0x00, 0x00, } func (this *CheckDefinition) Equal(that interface{}) bool { @@ -359,6 +377,9 @@ func (this *TCPCheck) Equal(that interface{}) bool { if this.ConnectTimeoutMs != that1.ConnectTimeoutMs { return false } + if this.IntervalMs != that1.IntervalMs { + return false + } return true } func (this *HTTPCheck) Equal(that interface{}) bool { @@ -389,6 +410,9 @@ func (this *HTTPCheck) Equal(that interface{}) bool { if this.Path != that1.Path { return false } + if this.IntervalMs != that1.IntervalMs { + return false + } return true } func (this *CheckDefinition) GoString() string { @@ -423,10 +447,11 @@ func (this *TCPCheck) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&models.TCPCheck{") s = append(s, "Port: "+fmt.Sprintf("%#v", this.Port)+",\n") s = append(s, "ConnectTimeoutMs: "+fmt.Sprintf("%#v", this.ConnectTimeoutMs)+",\n") + s = append(s, "IntervalMs: "+fmt.Sprintf("%#v", this.IntervalMs)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -434,11 +459,12 @@ func (this *HTTPCheck) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&models.HTTPCheck{") s = append(s, "Port: "+fmt.Sprintf("%#v", this.Port)+",\n") s = append(s, "RequestTimeoutMs: "+fmt.Sprintf("%#v", this.RequestTimeoutMs)+",\n") s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + s = append(s, "IntervalMs: "+fmt.Sprintf("%#v", this.IntervalMs)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -561,6 +587,11 @@ func (m *TCPCheck) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IntervalMs != 0 { + i = encodeVarintCheckDefinition(dAtA, i, uint64(m.IntervalMs)) + i-- + dAtA[i] = 0x18 + } if m.ConnectTimeoutMs != 0 { i = encodeVarintCheckDefinition(dAtA, i, uint64(m.ConnectTimeoutMs)) i-- @@ -594,6 +625,11 @@ func (m *HTTPCheck) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IntervalMs != 0 { + i = encodeVarintCheckDefinition(dAtA, i, uint64(m.IntervalMs)) + i-- + dAtA[i] = 0x20 + } if len(m.Path) > 0 { i -= len(m.Path) copy(dAtA[i:], m.Path) @@ -673,6 +709,9 @@ func (m *TCPCheck) Size() (n int) { if m.ConnectTimeoutMs != 0 { n += 1 + sovCheckDefinition(uint64(m.ConnectTimeoutMs)) } + if m.IntervalMs != 0 { + n += 1 + sovCheckDefinition(uint64(m.IntervalMs)) + } return n } @@ -692,6 +731,9 @@ func (m *HTTPCheck) Size() (n int) { if l > 0 { n += 1 + l + sovCheckDefinition(uint64(l)) } + if m.IntervalMs != 0 { + n += 1 + sovCheckDefinition(uint64(m.IntervalMs)) + } return n } @@ -735,6 +777,7 @@ func (this *TCPCheck) String() string { s := strings.Join([]string{`&TCPCheck{`, `Port:` + fmt.Sprintf("%v", this.Port) + `,`, `ConnectTimeoutMs:` + fmt.Sprintf("%v", this.ConnectTimeoutMs) + `,`, + `IntervalMs:` + fmt.Sprintf("%v", this.IntervalMs) + `,`, `}`, }, "") return s @@ -747,6 +790,7 @@ func (this *HTTPCheck) String() string { `Port:` + fmt.Sprintf("%v", this.Port) + `,`, `RequestTimeoutMs:` + fmt.Sprintf("%v", this.RequestTimeoutMs) + `,`, `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `IntervalMs:` + fmt.Sprintf("%v", this.IntervalMs) + `,`, `}`, }, "") return s @@ -1064,6 +1108,25 @@ func (m *TCPCheck) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntervalMs", wireType) + } + m.IntervalMs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCheckDefinition + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IntervalMs |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipCheckDefinition(dAtA[iNdEx:]) @@ -1184,6 +1247,25 @@ func (m *HTTPCheck) Unmarshal(dAtA []byte) error { } m.Path = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntervalMs", wireType) + } + m.IntervalMs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCheckDefinition + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IntervalMs |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipCheckDefinition(dAtA[iNdEx:]) diff --git a/models/check_definition.proto b/models/check_definition.proto index ed3f633f..84a018da 100644 --- a/models/check_definition.proto +++ b/models/check_definition.proto @@ -21,10 +21,12 @@ message Check { message TCPCheck { uint32 port = 1 [(gogoproto.jsontag) = "port"]; uint64 connect_timeout_ms = 2; + uint64 interval_ms = 3; } message HTTPCheck { uint32 port = 1 [(gogoproto.jsontag) = "port"]; uint64 request_timeout_ms = 2; string path = 3 [(gogoproto.jsontag) = "path"]; + uint64 interval_ms = 4; }