components/google-built-opentelemetry-collector/extension/healthagent/internal/healthpb/health.pb.go (307 lines of code) (raw):

// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v3.21.12 // source: health.proto package healthpb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // The health states that a health metric can aggregate to. type AggregationTarget int32 const ( // Unspecified. Will default to "TARGET_ALL" AggregationTarget_TARGET_UNSPECIFIED AggregationTarget = 0 // All. Will contribute to the scope's health and overall health. AggregationTarget_TARGET_ALL AggregationTarget = 1 // Scope. Will contribute to the specified Scope's health but not the Overall // health. AggregationTarget_TARGET_SCOPE AggregationTarget = 2 // None. Will not contribute to the instance's Overall health or the Scope's // health. AggregationTarget_TARGET_NONE AggregationTarget = 3 ) // Enum value maps for AggregationTarget. var ( AggregationTarget_name = map[int32]string{ 0: "TARGET_UNSPECIFIED", 1: "TARGET_ALL", 2: "TARGET_SCOPE", 3: "TARGET_NONE", } AggregationTarget_value = map[string]int32{ "TARGET_UNSPECIFIED": 0, "TARGET_ALL": 1, "TARGET_SCOPE": 2, "TARGET_NONE": 3, } ) func (x AggregationTarget) Enum() *AggregationTarget { p := new(AggregationTarget) *p = x return p } func (x AggregationTarget) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (AggregationTarget) Descriptor() protoreflect.EnumDescriptor { return file_health_proto_enumTypes[0].Descriptor() } func (AggregationTarget) Type() protoreflect.EnumType { return &file_health_proto_enumTypes[0] } func (x AggregationTarget) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use AggregationTarget.Descriptor instead. func (AggregationTarget) EnumDescriptor() ([]byte, []int) { return file_health_proto_rawDescGZIP(), []int{0} } // HealthStatus defines the possible health status. type HealthStatus int32 const ( // Health status is unknown: not initialized or failed to retrieve. HealthStatus_UNKNOWN HealthStatus = 0 // The resource is healthy. HealthStatus_HEALTHY HealthStatus = 1 // The resource is unhealthy. HealthStatus_UNHEALTHY HealthStatus = 2 // The resource is unresponsive. HealthStatus_TIMEOUT HealthStatus = 3 ) // Enum value maps for HealthStatus. var ( HealthStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "HEALTHY", 2: "UNHEALTHY", 3: "TIMEOUT", } HealthStatus_value = map[string]int32{ "UNKNOWN": 0, "HEALTHY": 1, "UNHEALTHY": 2, "TIMEOUT": 3, } ) func (x HealthStatus) Enum() *HealthStatus { p := new(HealthStatus) *p = x return p } func (x HealthStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (HealthStatus) Descriptor() protoreflect.EnumDescriptor { return file_health_proto_enumTypes[1].Descriptor() } func (HealthStatus) Type() protoreflect.EnumType { return &file_health_proto_enumTypes[1] } func (x HealthStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use HealthStatus.Descriptor instead. func (HealthStatus) EnumDescriptor() ([]byte, []int) { return file_health_proto_rawDescGZIP(), []int{1} } // HealthMetric defines health status for one resource. type HealthMetric struct { state protoimpl.MessageState `protogen:"open.v1"` // Required. Used to distinguish the health status for different types of // checks for a same scope. This value has to be unique within a scope. // // Eg: If we are checking whether a container is able to serve traffic or not // we can have multiple checks like container is up, it can connect with db // etc. in that case the scope would be same, but we can have different name // for the checks to understand what is the reason unhealthy status. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Required. Health status of target resource. Status HealthStatus `protobuf:"varint,2,opt,name=status,proto3,enum=healthagent.HealthStatus" json:"status,omitempty"` // Optional. Health check agent can send extra data back through this // field if it wants. e.g. last error message of the service, how many times // the service restarted, etc. Details *anypb.Any `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // The scope for the health metric. For example: // "container": health regarding the containers in the VM. // "redis": health regarding the managed service (redis in this example). // "logger": health regarding the logging agent. Scope string `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"` // Optional. Specifies what health state a metric will aggregate to. AggregationTarget AggregationTarget `protobuf:"varint,5,opt,name=aggregation_target,json=aggregationTarget,proto3,enum=healthagent.AggregationTarget" json:"aggregation_target,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *HealthMetric) Reset() { *x = HealthMetric{} mi := &file_health_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *HealthMetric) String() string { return protoimpl.X.MessageStringOf(x) } func (*HealthMetric) ProtoMessage() {} func (x *HealthMetric) ProtoReflect() protoreflect.Message { mi := &file_health_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use HealthMetric.ProtoReflect.Descriptor instead. func (*HealthMetric) Descriptor() ([]byte, []int) { return file_health_proto_rawDescGZIP(), []int{0} } func (x *HealthMetric) GetName() string { if x != nil { return x.Name } return "" } func (x *HealthMetric) GetStatus() HealthStatus { if x != nil { return x.Status } return HealthStatus_UNKNOWN } func (x *HealthMetric) GetDetails() *anypb.Any { if x != nil { return x.Details } return nil } func (x *HealthMetric) GetScope() string { if x != nil { return x.Scope } return "" } func (x *HealthMetric) GetAggregationTarget() AggregationTarget { if x != nil { return x.AggregationTarget } return AggregationTarget_TARGET_UNSPECIFIED } // GetHealthRequest is the request message of GetHealth method. type GetHealthRequest struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetHealthRequest) Reset() { *x = GetHealthRequest{} mi := &file_health_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *GetHealthRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetHealthRequest) ProtoMessage() {} func (x *GetHealthRequest) ProtoReflect() protoreflect.Message { mi := &file_health_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GetHealthRequest.ProtoReflect.Descriptor instead. func (*GetHealthRequest) Descriptor() ([]byte, []int) { return file_health_proto_rawDescGZIP(), []int{1} } // GetHealthResponse is the response message of GetHealth method. It returns a // list of health metrics for target resources. type GetHealthResponse struct { state protoimpl.MessageState `protogen:"open.v1"` HealthMetrics []*HealthMetric `protobuf:"bytes,1,rep,name=health_metrics,json=healthMetrics,proto3" json:"health_metrics,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetHealthResponse) Reset() { *x = GetHealthResponse{} mi := &file_health_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *GetHealthResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetHealthResponse) ProtoMessage() {} func (x *GetHealthResponse) ProtoReflect() protoreflect.Message { mi := &file_health_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GetHealthResponse.ProtoReflect.Descriptor instead. func (*GetHealthResponse) Descriptor() ([]byte, []int) { return file_health_proto_rawDescGZIP(), []int{2} } func (x *GetHealthResponse) GetHealthMetrics() []*HealthMetric { if x != nil { return x.HealthMetrics } return nil } var File_health_proto protoreflect.FileDescriptor const file_health_proto_rawDesc = "" + "\n" + "\fhealth.proto\x12\vhealthagent\x1a\x19google/protobuf/any.proto\"\xea\x01\n" + "\fHealthMetric\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x121\n" + "\x06status\x18\x02 \x01(\x0e2\x19.healthagent.HealthStatusR\x06status\x12.\n" + "\adetails\x18\x03 \x01(\v2\x14.google.protobuf.AnyR\adetails\x12\x14\n" + "\x05scope\x18\x04 \x01(\tR\x05scope\x12M\n" + "\x12aggregation_target\x18\x05 \x01(\x0e2\x1e.healthagent.AggregationTargetR\x11aggregationTarget\"\x12\n" + "\x10GetHealthRequest\"U\n" + "\x11GetHealthResponse\x12@\n" + "\x0ehealth_metrics\x18\x01 \x03(\v2\x19.healthagent.HealthMetricR\rhealthMetrics*^\n" + "\x11AggregationTarget\x12\x16\n" + "\x12TARGET_UNSPECIFIED\x10\x00\x12\x0e\n" + "\n" + "TARGET_ALL\x10\x01\x12\x10\n" + "\fTARGET_SCOPE\x10\x02\x12\x0f\n" + "\vTARGET_NONE\x10\x03*D\n" + "\fHealthStatus\x12\v\n" + "\aUNKNOWN\x10\x00\x12\v\n" + "\aHEALTHY\x10\x01\x12\r\n" + "\tUNHEALTHY\x10\x02\x12\v\n" + "\aTIMEOUT\x10\x032Y\n" + "\vHealthAgent\x12J\n" + "\tGetHealth\x12\x1d.healthagent.GetHealthRequest\x1a\x1e.healthagent.GetHealthResponseB\x13Z\x11internal/healthpbb\x06proto3" var ( file_health_proto_rawDescOnce sync.Once file_health_proto_rawDescData []byte ) func file_health_proto_rawDescGZIP() []byte { file_health_proto_rawDescOnce.Do(func() { file_health_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_health_proto_rawDesc), len(file_health_proto_rawDesc))) }) return file_health_proto_rawDescData } var file_health_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_health_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_health_proto_goTypes = []any{ (AggregationTarget)(0), // 0: healthagent.AggregationTarget (HealthStatus)(0), // 1: healthagent.HealthStatus (*HealthMetric)(nil), // 2: healthagent.HealthMetric (*GetHealthRequest)(nil), // 3: healthagent.GetHealthRequest (*GetHealthResponse)(nil), // 4: healthagent.GetHealthResponse (*anypb.Any)(nil), // 5: google.protobuf.Any } var file_health_proto_depIdxs = []int32{ 1, // 0: healthagent.HealthMetric.status:type_name -> healthagent.HealthStatus 5, // 1: healthagent.HealthMetric.details:type_name -> google.protobuf.Any 0, // 2: healthagent.HealthMetric.aggregation_target:type_name -> healthagent.AggregationTarget 2, // 3: healthagent.GetHealthResponse.health_metrics:type_name -> healthagent.HealthMetric 3, // 4: healthagent.HealthAgent.GetHealth:input_type -> healthagent.GetHealthRequest 4, // 5: healthagent.HealthAgent.GetHealth:output_type -> healthagent.GetHealthResponse 5, // [5:6] is the sub-list for method output_type 4, // [4:5] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_health_proto_init() } func file_health_proto_init() { if File_health_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_health_proto_rawDesc), len(file_health_proto_rawDesc)), NumEnums: 2, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, GoTypes: file_health_proto_goTypes, DependencyIndexes: file_health_proto_depIdxs, EnumInfos: file_health_proto_enumTypes, MessageInfos: file_health_proto_msgTypes, }.Build() File_health_proto = out.File file_health_proto_goTypes = nil file_health_proto_depIdxs = nil }