Files
tasks/api/enums/v1/cluster.pb.go
Yu XiaandGitHub fdd8b92fae Add health check on history service role (#6309)
## What changed?
<!-- Describe what has changed in this PR -->
Add health check on history service role

## Why?
<!-- Tell your future self why have you made these changes -->
This health check checks on persistence latency and error rate.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
2024-07-24 14:49:47 -07:00

256 lines
9.7 KiB
Go

// The MIT License
//
// Copyright (c) 2021 Temporal Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Code generated by protoc-gen-go. DO NOT EDIT.
// plugins:
// protoc-gen-go
// protoc
// source: temporal/server/api/enums/v1/cluster.proto
package enums
import (
reflect "reflect"
"strconv"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
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)
)
type ClusterMemberRole int32
const (
CLUSTER_MEMBER_ROLE_UNSPECIFIED ClusterMemberRole = 0
CLUSTER_MEMBER_ROLE_FRONTEND ClusterMemberRole = 1
CLUSTER_MEMBER_ROLE_HISTORY ClusterMemberRole = 2
CLUSTER_MEMBER_ROLE_MATCHING ClusterMemberRole = 3
CLUSTER_MEMBER_ROLE_WORKER ClusterMemberRole = 4
)
// Enum value maps for ClusterMemberRole.
var (
ClusterMemberRole_name = map[int32]string{
0: "CLUSTER_MEMBER_ROLE_UNSPECIFIED",
1: "CLUSTER_MEMBER_ROLE_FRONTEND",
2: "CLUSTER_MEMBER_ROLE_HISTORY",
3: "CLUSTER_MEMBER_ROLE_MATCHING",
4: "CLUSTER_MEMBER_ROLE_WORKER",
}
ClusterMemberRole_value = map[string]int32{
"CLUSTER_MEMBER_ROLE_UNSPECIFIED": 0,
"CLUSTER_MEMBER_ROLE_FRONTEND": 1,
"CLUSTER_MEMBER_ROLE_HISTORY": 2,
"CLUSTER_MEMBER_ROLE_MATCHING": 3,
"CLUSTER_MEMBER_ROLE_WORKER": 4,
}
)
func (x ClusterMemberRole) Enum() *ClusterMemberRole {
p := new(ClusterMemberRole)
*p = x
return p
}
func (x ClusterMemberRole) String() string {
switch x {
case CLUSTER_MEMBER_ROLE_UNSPECIFIED:
return "Unspecified"
case CLUSTER_MEMBER_ROLE_FRONTEND:
return "Frontend"
case CLUSTER_MEMBER_ROLE_HISTORY:
return "History"
case CLUSTER_MEMBER_ROLE_MATCHING:
return "Matching"
case CLUSTER_MEMBER_ROLE_WORKER:
return "Worker"
default:
return strconv.Itoa(int(x))
}
}
func (ClusterMemberRole) Descriptor() protoreflect.EnumDescriptor {
return file_temporal_server_api_enums_v1_cluster_proto_enumTypes[0].Descriptor()
}
func (ClusterMemberRole) Type() protoreflect.EnumType {
return &file_temporal_server_api_enums_v1_cluster_proto_enumTypes[0]
}
func (x ClusterMemberRole) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ClusterMemberRole.Descriptor instead.
func (ClusterMemberRole) EnumDescriptor() ([]byte, []int) {
return file_temporal_server_api_enums_v1_cluster_proto_rawDescGZIP(), []int{0}
}
type HealthState int32
const (
HEALTH_STATE_UNSPECIFIED HealthState = 0
HEALTH_STATE_SERVING HealthState = 1
HEALTH_STATE_NOT_SERVING HealthState = 2
)
// Enum value maps for HealthState.
var (
HealthState_name = map[int32]string{
0: "HEALTH_STATE_UNSPECIFIED",
1: "HEALTH_STATE_SERVING",
2: "HEALTH_STATE_NOT_SERVING",
}
HealthState_value = map[string]int32{
"HEALTH_STATE_UNSPECIFIED": 0,
"HEALTH_STATE_SERVING": 1,
"HEALTH_STATE_NOT_SERVING": 2,
}
)
func (x HealthState) Enum() *HealthState {
p := new(HealthState)
*p = x
return p
}
func (x HealthState) String() string {
switch x {
case HEALTH_STATE_UNSPECIFIED:
return "Unspecified"
case HEALTH_STATE_SERVING:
return "Serving"
case HEALTH_STATE_NOT_SERVING:
return "NotServing"
default:
return strconv.Itoa(int(x))
}
}
func (HealthState) Descriptor() protoreflect.EnumDescriptor {
return file_temporal_server_api_enums_v1_cluster_proto_enumTypes[1].Descriptor()
}
func (HealthState) Type() protoreflect.EnumType {
return &file_temporal_server_api_enums_v1_cluster_proto_enumTypes[1]
}
func (x HealthState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use HealthState.Descriptor instead.
func (HealthState) EnumDescriptor() ([]byte, []int) {
return file_temporal_server_api_enums_v1_cluster_proto_rawDescGZIP(), []int{1}
}
var File_temporal_server_api_enums_v1_cluster_proto protoreflect.FileDescriptor
var file_temporal_server_api_enums_v1_cluster_proto_rawDesc = []byte{
0x0a, 0x2a, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x74, 0x65,
0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2a, 0xbd, 0x01, 0x0a, 0x11, 0x43,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65,
0x12, 0x23, 0x0a, 0x1f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x4d, 0x45, 0x4d, 0x42,
0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52,
0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x46, 0x52, 0x4f,
0x4e, 0x54, 0x45, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4c, 0x55, 0x53, 0x54,
0x45, 0x52, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x48,
0x49, 0x53, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x4c, 0x55, 0x53,
0x54, 0x45, 0x52, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f,
0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4c,
0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c,
0x45, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x45, 0x52, 0x10, 0x04, 0x2a, 0x63, 0x0a, 0x0b, 0x48, 0x65,
0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41,
0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x48, 0x45, 0x41, 0x4c, 0x54,
0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47, 0x10,
0x01, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54,
0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x42,
0x2a, 0x5a, 0x28, 0x67, 0x6f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x69,
0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x75,
0x6d, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_temporal_server_api_enums_v1_cluster_proto_rawDescOnce sync.Once
file_temporal_server_api_enums_v1_cluster_proto_rawDescData = file_temporal_server_api_enums_v1_cluster_proto_rawDesc
)
func file_temporal_server_api_enums_v1_cluster_proto_rawDescGZIP() []byte {
file_temporal_server_api_enums_v1_cluster_proto_rawDescOnce.Do(func() {
file_temporal_server_api_enums_v1_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_temporal_server_api_enums_v1_cluster_proto_rawDescData)
})
return file_temporal_server_api_enums_v1_cluster_proto_rawDescData
}
var file_temporal_server_api_enums_v1_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_temporal_server_api_enums_v1_cluster_proto_goTypes = []interface{}{
(ClusterMemberRole)(0), // 0: temporal.server.api.enums.v1.ClusterMemberRole
(HealthState)(0), // 1: temporal.server.api.enums.v1.HealthState
}
var file_temporal_server_api_enums_v1_cluster_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_temporal_server_api_enums_v1_cluster_proto_init() }
func file_temporal_server_api_enums_v1_cluster_proto_init() {
if File_temporal_server_api_enums_v1_cluster_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_temporal_server_api_enums_v1_cluster_proto_rawDesc,
NumEnums: 2,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_temporal_server_api_enums_v1_cluster_proto_goTypes,
DependencyIndexes: file_temporal_server_api_enums_v1_cluster_proto_depIdxs,
EnumInfos: file_temporal_server_api_enums_v1_cluster_proto_enumTypes,
}.Build()
File_temporal_server_api_enums_v1_cluster_proto = out.File
file_temporal_server_api_enums_v1_cluster_proto_rawDesc = nil
file_temporal_server_api_enums_v1_cluster_proto_goTypes = nil
file_temporal_server_api_enums_v1_cluster_proto_depIdxs = nil
}