mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? Add a new metrics gauge to track host health ## Why? Visibility into which hosts are failing when ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) ## Potential risks Adding Sean to the PR to make sure I didn't miss anything obvious in regards to how we want to display this.
227 lines
7.2 KiB
Go
227 lines
7.2 KiB
Go
// 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"
|
|
unsafe "unsafe"
|
|
|
|
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
|
|
// The host is in a healthy state.
|
|
HEALTH_STATE_SERVING HealthState = 1
|
|
// The host is unhealthy through external observation.
|
|
HEALTH_STATE_NOT_SERVING HealthState = 2
|
|
// The host has marked itself as not ready to serve traffic.
|
|
HEALTH_STATE_DECLINED_SERVING HealthState = 3
|
|
)
|
|
|
|
// Enum value maps for HealthState.
|
|
var (
|
|
HealthState_name = map[int32]string{
|
|
0: "HEALTH_STATE_UNSPECIFIED",
|
|
1: "HEALTH_STATE_SERVING",
|
|
2: "HEALTH_STATE_NOT_SERVING",
|
|
3: "HEALTH_STATE_DECLINED_SERVING",
|
|
}
|
|
HealthState_value = map[string]int32{
|
|
"HEALTH_STATE_UNSPECIFIED": 0,
|
|
"HEALTH_STATE_SERVING": 1,
|
|
"HEALTH_STATE_NOT_SERVING": 2,
|
|
"HEALTH_STATE_DECLINED_SERVING": 3,
|
|
}
|
|
)
|
|
|
|
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"
|
|
case HEALTH_STATE_DECLINED_SERVING:
|
|
return "DeclinedServing"
|
|
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
|
|
|
|
const file_temporal_server_api_enums_v1_cluster_proto_rawDesc = "" +
|
|
"\n" +
|
|
"*temporal/server/api/enums/v1/cluster.proto\x12\x1ctemporal.server.api.enums.v1*\xbd\x01\n" +
|
|
"\x11ClusterMemberRole\x12#\n" +
|
|
"\x1fCLUSTER_MEMBER_ROLE_UNSPECIFIED\x10\x00\x12 \n" +
|
|
"\x1cCLUSTER_MEMBER_ROLE_FRONTEND\x10\x01\x12\x1f\n" +
|
|
"\x1bCLUSTER_MEMBER_ROLE_HISTORY\x10\x02\x12 \n" +
|
|
"\x1cCLUSTER_MEMBER_ROLE_MATCHING\x10\x03\x12\x1e\n" +
|
|
"\x1aCLUSTER_MEMBER_ROLE_WORKER\x10\x04*\x86\x01\n" +
|
|
"\vHealthState\x12\x1c\n" +
|
|
"\x18HEALTH_STATE_UNSPECIFIED\x10\x00\x12\x18\n" +
|
|
"\x14HEALTH_STATE_SERVING\x10\x01\x12\x1c\n" +
|
|
"\x18HEALTH_STATE_NOT_SERVING\x10\x02\x12!\n" +
|
|
"\x1dHEALTH_STATE_DECLINED_SERVING\x10\x03B*Z(go.temporal.io/server/api/enums/v1;enumsb\x06proto3"
|
|
|
|
var (
|
|
file_temporal_server_api_enums_v1_cluster_proto_rawDescOnce sync.Once
|
|
file_temporal_server_api_enums_v1_cluster_proto_rawDescData []byte
|
|
)
|
|
|
|
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(unsafe.Slice(unsafe.StringData(file_temporal_server_api_enums_v1_cluster_proto_rawDesc), len(file_temporal_server_api_enums_v1_cluster_proto_rawDesc)))
|
|
})
|
|
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 = []any{
|
|
(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: unsafe.Slice(unsafe.StringData(file_temporal_server_api_enums_v1_cluster_proto_rawDesc), len(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_goTypes = nil
|
|
file_temporal_server_api_enums_v1_cluster_proto_depIdxs = nil
|
|
}
|