diff --git a/Makefile b/Makefile index 7bc08bb9..17d479e4 100644 --- a/Makefile +++ b/Makefile @@ -665,6 +665,8 @@ DAKR_MPA_PROTO_FILE ?= mpa.proto DAKR_MPA_PROTO ?= internal/proto/$(DAKR_MPA_PROTO_FILE) DAKR_CLUSTER_PROTO_FILE ?= cluster.proto DAKR_CLUSTER_PROTO ?= $(DAKR_DIR)/proto/api/v1/$(DAKR_CLUSTER_PROTO_FILE) +DAKR_OPERATOR_HEALTH_PROTO_FILE ?= operator_health.proto +DAKR_OPERATOR_HEALTH_PROTO ?= $(DAKR_DIR)/proto/api/v1/$(DAKR_OPERATOR_HEALTH_PROTO_FILE) # BUF_VERSION and BUF_BINARY_NAME are to generate a Dakr protobuf/gRPC client. BUF_VERSION := 1.31.0 @@ -692,7 +694,7 @@ generate-proto: install-buf ## Fetch latest Dakr protobuf mkdir -p "$$PROTO_DIR/api/v1"; \ cp "$(DAKR_MPA_PROTO)" "$$PROTO_DIR/api/v1"; \ find "$$PROTO_DIR" -type f -name "*.yaml" -exec perl -pi -e 's|github.com/devzero-inc/services/dakr/gen|github.com/devzero-inc/zxporter/gen|g' {} +; \ - buf build "$(DAKR_DIR)" --path "$(DAKR_METRICS_COLLECTOR_PROTO)" --path "$(DAKR_CLUSTER_PROTO)" -o "$$PROTO_DIR"/dakr_proto_descriptor.bin; \ + buf build "$(DAKR_DIR)" --path "$(DAKR_METRICS_COLLECTOR_PROTO)" --path "$(DAKR_CLUSTER_PROTO)" --path "$(DAKR_OPERATOR_HEALTH_PROTO)" -o "$$PROTO_DIR"/dakr_proto_descriptor.bin; \ buf generate --include-imports "$$PROTO_DIR"/dakr_proto_descriptor.bin; buf generate --verbose --include-imports --timeout=5m . diff --git a/gen/api/v1/apiv1connect/operator.connect.go b/gen/api/v1/apiv1connect/operator.connect.go new file mode 100644 index 00000000..51f0aae4 --- /dev/null +++ b/gen/api/v1/apiv1connect/operator.connect.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: api/v1/operator.proto + +package apiv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/devzero-inc/zxporter/gen/api/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // OperatorServiceName is the fully-qualified name of the OperatorService service. + OperatorServiceName = "api.v1.OperatorService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // OperatorServiceGetOperatorsProcedure is the fully-qualified name of the OperatorService's + // GetOperators RPC. + OperatorServiceGetOperatorsProcedure = "/api.v1.OperatorService/GetOperators" + // OperatorServiceGetOperatorMetadataProcedure is the fully-qualified name of the OperatorService's + // GetOperatorMetadata RPC. + OperatorServiceGetOperatorMetadataProcedure = "/api.v1.OperatorService/GetOperatorMetadata" + // OperatorServiceGetOCIRegistriesProcedure is the fully-qualified name of the OperatorService's + // GetOCIRegistries RPC. + OperatorServiceGetOCIRegistriesProcedure = "/api.v1.OperatorService/GetOCIRegistries" +) + +// OperatorServiceClient is a client for the api.v1.OperatorService service. +type OperatorServiceClient interface { + GetOperators(context.Context, *connect.Request[v1.GetOperatorsRequest]) (*connect.Response[v1.GetOperatorsResponse], error) + GetOperatorMetadata(context.Context, *connect.Request[v1.GetOperatorMetadataRequest]) (*connect.Response[v1.GetOperatorMetadataResponse], error) + GetOCIRegistries(context.Context, *connect.Request[v1.GetOCIRegistriesRequest]) (*connect.Response[v1.GetOCIRegistriesResponse], error) +} + +// NewOperatorServiceClient constructs a client for the api.v1.OperatorService service. By default, +// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and +// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() +// or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewOperatorServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) OperatorServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &operatorServiceClient{ + getOperators: connect.NewClient[v1.GetOperatorsRequest, v1.GetOperatorsResponse]( + httpClient, + baseURL+OperatorServiceGetOperatorsProcedure, + opts..., + ), + getOperatorMetadata: connect.NewClient[v1.GetOperatorMetadataRequest, v1.GetOperatorMetadataResponse]( + httpClient, + baseURL+OperatorServiceGetOperatorMetadataProcedure, + opts..., + ), + getOCIRegistries: connect.NewClient[v1.GetOCIRegistriesRequest, v1.GetOCIRegistriesResponse]( + httpClient, + baseURL+OperatorServiceGetOCIRegistriesProcedure, + opts..., + ), + } +} + +// operatorServiceClient implements OperatorServiceClient. +type operatorServiceClient struct { + getOperators *connect.Client[v1.GetOperatorsRequest, v1.GetOperatorsResponse] + getOperatorMetadata *connect.Client[v1.GetOperatorMetadataRequest, v1.GetOperatorMetadataResponse] + getOCIRegistries *connect.Client[v1.GetOCIRegistriesRequest, v1.GetOCIRegistriesResponse] +} + +// GetOperators calls api.v1.OperatorService.GetOperators. +func (c *operatorServiceClient) GetOperators(ctx context.Context, req *connect.Request[v1.GetOperatorsRequest]) (*connect.Response[v1.GetOperatorsResponse], error) { + return c.getOperators.CallUnary(ctx, req) +} + +// GetOperatorMetadata calls api.v1.OperatorService.GetOperatorMetadata. +func (c *operatorServiceClient) GetOperatorMetadata(ctx context.Context, req *connect.Request[v1.GetOperatorMetadataRequest]) (*connect.Response[v1.GetOperatorMetadataResponse], error) { + return c.getOperatorMetadata.CallUnary(ctx, req) +} + +// GetOCIRegistries calls api.v1.OperatorService.GetOCIRegistries. +func (c *operatorServiceClient) GetOCIRegistries(ctx context.Context, req *connect.Request[v1.GetOCIRegistriesRequest]) (*connect.Response[v1.GetOCIRegistriesResponse], error) { + return c.getOCIRegistries.CallUnary(ctx, req) +} + +// OperatorServiceHandler is an implementation of the api.v1.OperatorService service. +type OperatorServiceHandler interface { + GetOperators(context.Context, *connect.Request[v1.GetOperatorsRequest]) (*connect.Response[v1.GetOperatorsResponse], error) + GetOperatorMetadata(context.Context, *connect.Request[v1.GetOperatorMetadataRequest]) (*connect.Response[v1.GetOperatorMetadataResponse], error) + GetOCIRegistries(context.Context, *connect.Request[v1.GetOCIRegistriesRequest]) (*connect.Response[v1.GetOCIRegistriesResponse], error) +} + +// NewOperatorServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewOperatorServiceHandler(svc OperatorServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + operatorServiceGetOperatorsHandler := connect.NewUnaryHandler( + OperatorServiceGetOperatorsProcedure, + svc.GetOperators, + opts..., + ) + operatorServiceGetOperatorMetadataHandler := connect.NewUnaryHandler( + OperatorServiceGetOperatorMetadataProcedure, + svc.GetOperatorMetadata, + opts..., + ) + operatorServiceGetOCIRegistriesHandler := connect.NewUnaryHandler( + OperatorServiceGetOCIRegistriesProcedure, + svc.GetOCIRegistries, + opts..., + ) + return "/api.v1.OperatorService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case OperatorServiceGetOperatorsProcedure: + operatorServiceGetOperatorsHandler.ServeHTTP(w, r) + case OperatorServiceGetOperatorMetadataProcedure: + operatorServiceGetOperatorMetadataHandler.ServeHTTP(w, r) + case OperatorServiceGetOCIRegistriesProcedure: + operatorServiceGetOCIRegistriesHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedOperatorServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedOperatorServiceHandler struct{} + +func (UnimplementedOperatorServiceHandler) GetOperators(context.Context, *connect.Request[v1.GetOperatorsRequest]) (*connect.Response[v1.GetOperatorsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("api.v1.OperatorService.GetOperators is not implemented")) +} + +func (UnimplementedOperatorServiceHandler) GetOperatorMetadata(context.Context, *connect.Request[v1.GetOperatorMetadataRequest]) (*connect.Response[v1.GetOperatorMetadataResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("api.v1.OperatorService.GetOperatorMetadata is not implemented")) +} + +func (UnimplementedOperatorServiceHandler) GetOCIRegistries(context.Context, *connect.Request[v1.GetOCIRegistriesRequest]) (*connect.Response[v1.GetOCIRegistriesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("api.v1.OperatorService.GetOCIRegistries is not implemented")) +} diff --git a/gen/api/v1/apiv1connect/operator_health.connect.go b/gen/api/v1/apiv1connect/operator_health.connect.go new file mode 100644 index 00000000..4ea9d15a --- /dev/null +++ b/gen/api/v1/apiv1connect/operator_health.connect.go @@ -0,0 +1,132 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: api/v1/operator_health.proto + +package apiv1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/devzero-inc/zxporter/gen/api/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // OperatorHealthServiceName is the fully-qualified name of the OperatorHealthService service. + OperatorHealthServiceName = "api.v1.OperatorHealthService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // OperatorHealthServiceReportHealthProcedure is the fully-qualified name of the + // OperatorHealthService's ReportHealth RPC. + OperatorHealthServiceReportHealthProcedure = "/api.v1.OperatorHealthService/ReportHealth" + // OperatorHealthServiceGetClusterOperatorHealthProcedure is the fully-qualified name of the + // OperatorHealthService's GetClusterOperatorHealth RPC. + OperatorHealthServiceGetClusterOperatorHealthProcedure = "/api.v1.OperatorHealthService/GetClusterOperatorHealth" +) + +// OperatorHealthServiceClient is a client for the api.v1.OperatorHealthService service. +type OperatorHealthServiceClient interface { + ReportHealth(context.Context, *connect.Request[v1.ReportHealthRequest]) (*connect.Response[v1.ReportHealthResponse], error) + GetClusterOperatorHealth(context.Context, *connect.Request[v1.GetClusterOperatorHealthRequest]) (*connect.Response[v1.GetClusterOperatorHealthResponse], error) +} + +// NewOperatorHealthServiceClient constructs a client for the api.v1.OperatorHealthService service. +// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped +// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewOperatorHealthServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) OperatorHealthServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &operatorHealthServiceClient{ + reportHealth: connect.NewClient[v1.ReportHealthRequest, v1.ReportHealthResponse]( + httpClient, + baseURL+OperatorHealthServiceReportHealthProcedure, + opts..., + ), + getClusterOperatorHealth: connect.NewClient[v1.GetClusterOperatorHealthRequest, v1.GetClusterOperatorHealthResponse]( + httpClient, + baseURL+OperatorHealthServiceGetClusterOperatorHealthProcedure, + opts..., + ), + } +} + +// operatorHealthServiceClient implements OperatorHealthServiceClient. +type operatorHealthServiceClient struct { + reportHealth *connect.Client[v1.ReportHealthRequest, v1.ReportHealthResponse] + getClusterOperatorHealth *connect.Client[v1.GetClusterOperatorHealthRequest, v1.GetClusterOperatorHealthResponse] +} + +// ReportHealth calls api.v1.OperatorHealthService.ReportHealth. +func (c *operatorHealthServiceClient) ReportHealth(ctx context.Context, req *connect.Request[v1.ReportHealthRequest]) (*connect.Response[v1.ReportHealthResponse], error) { + return c.reportHealth.CallUnary(ctx, req) +} + +// GetClusterOperatorHealth calls api.v1.OperatorHealthService.GetClusterOperatorHealth. +func (c *operatorHealthServiceClient) GetClusterOperatorHealth(ctx context.Context, req *connect.Request[v1.GetClusterOperatorHealthRequest]) (*connect.Response[v1.GetClusterOperatorHealthResponse], error) { + return c.getClusterOperatorHealth.CallUnary(ctx, req) +} + +// OperatorHealthServiceHandler is an implementation of the api.v1.OperatorHealthService service. +type OperatorHealthServiceHandler interface { + ReportHealth(context.Context, *connect.Request[v1.ReportHealthRequest]) (*connect.Response[v1.ReportHealthResponse], error) + GetClusterOperatorHealth(context.Context, *connect.Request[v1.GetClusterOperatorHealthRequest]) (*connect.Response[v1.GetClusterOperatorHealthResponse], error) +} + +// NewOperatorHealthServiceHandler builds an HTTP handler from the service implementation. It +// returns the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewOperatorHealthServiceHandler(svc OperatorHealthServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + operatorHealthServiceReportHealthHandler := connect.NewUnaryHandler( + OperatorHealthServiceReportHealthProcedure, + svc.ReportHealth, + opts..., + ) + operatorHealthServiceGetClusterOperatorHealthHandler := connect.NewUnaryHandler( + OperatorHealthServiceGetClusterOperatorHealthProcedure, + svc.GetClusterOperatorHealth, + opts..., + ) + return "/api.v1.OperatorHealthService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case OperatorHealthServiceReportHealthProcedure: + operatorHealthServiceReportHealthHandler.ServeHTTP(w, r) + case OperatorHealthServiceGetClusterOperatorHealthProcedure: + operatorHealthServiceGetClusterOperatorHealthHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedOperatorHealthServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedOperatorHealthServiceHandler struct{} + +func (UnimplementedOperatorHealthServiceHandler) ReportHealth(context.Context, *connect.Request[v1.ReportHealthRequest]) (*connect.Response[v1.ReportHealthResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("api.v1.OperatorHealthService.ReportHealth is not implemented")) +} + +func (UnimplementedOperatorHealthServiceHandler) GetClusterOperatorHealth(context.Context, *connect.Request[v1.GetClusterOperatorHealthRequest]) (*connect.Response[v1.GetClusterOperatorHealthResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("api.v1.OperatorHealthService.GetClusterOperatorHealth is not implemented")) +} diff --git a/gen/api/v1/operator.pb.go b/gen/api/v1/operator.pb.go new file mode 100644 index 00000000..0a0070ef --- /dev/null +++ b/gen/api/v1/operator.pb.go @@ -0,0 +1,1641 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: api/v1/operator.proto + +package apiv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +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) +) + +// Enums defining operator details +type OperatorType int32 + +const ( + OperatorType_OPERATOR_TYPE_UNSPECIFIED OperatorType = 0 + OperatorType_OPERATOR_TYPE_READ OperatorType = 1 + OperatorType_OPERATOR_TYPE_WRITE OperatorType = 2 + OperatorType_OPERATOR_TYPE_NODE OperatorType = 3 + OperatorType_OPERATOR_TYPE_SECURITY OperatorType = 4 + OperatorType_OPERATOR_TYPE_NETWORK OperatorType = 5 +) + +// Enum value maps for OperatorType. +var ( + OperatorType_name = map[int32]string{ + 0: "OPERATOR_TYPE_UNSPECIFIED", + 1: "OPERATOR_TYPE_READ", + 2: "OPERATOR_TYPE_WRITE", + 3: "OPERATOR_TYPE_NODE", + 4: "OPERATOR_TYPE_SECURITY", + 5: "OPERATOR_TYPE_NETWORK", + } + OperatorType_value = map[string]int32{ + "OPERATOR_TYPE_UNSPECIFIED": 0, + "OPERATOR_TYPE_READ": 1, + "OPERATOR_TYPE_WRITE": 2, + "OPERATOR_TYPE_NODE": 3, + "OPERATOR_TYPE_SECURITY": 4, + "OPERATOR_TYPE_NETWORK": 5, + } +) + +func (x OperatorType) Enum() *OperatorType { + p := new(OperatorType) + *p = x + return p +} + +func (x OperatorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OperatorType) Descriptor() protoreflect.EnumDescriptor { + return file_api_v1_operator_proto_enumTypes[0].Descriptor() +} + +func (OperatorType) Type() protoreflect.EnumType { + return &file_api_v1_operator_proto_enumTypes[0] +} + +func (x OperatorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OperatorType.Descriptor instead. +func (OperatorType) EnumDescriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{0} +} + +type OperatorState int32 + +const ( + OperatorState_OPERATOR_STATE_UNSPECIFIED OperatorState = 0 + OperatorState_OPERATOR_STATE_DISABLED OperatorState = 1 + OperatorState_OPERATOR_STATE_OPERATIONAL OperatorState = 2 + OperatorState_OPERATOR_STATE_DEGRADED OperatorState = 3 + OperatorState_OPERATOR_STATE_ERROR OperatorState = 4 +) + +// Enum value maps for OperatorState. +var ( + OperatorState_name = map[int32]string{ + 0: "OPERATOR_STATE_UNSPECIFIED", + 1: "OPERATOR_STATE_DISABLED", + 2: "OPERATOR_STATE_OPERATIONAL", + 3: "OPERATOR_STATE_DEGRADED", + 4: "OPERATOR_STATE_ERROR", + } + OperatorState_value = map[string]int32{ + "OPERATOR_STATE_UNSPECIFIED": 0, + "OPERATOR_STATE_DISABLED": 1, + "OPERATOR_STATE_OPERATIONAL": 2, + "OPERATOR_STATE_DEGRADED": 3, + "OPERATOR_STATE_ERROR": 4, + } +) + +func (x OperatorState) Enum() *OperatorState { + p := new(OperatorState) + *p = x + return p +} + +func (x OperatorState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OperatorState) Descriptor() protoreflect.EnumDescriptor { + return file_api_v1_operator_proto_enumTypes[1].Descriptor() +} + +func (OperatorState) Type() protoreflect.EnumType { + return &file_api_v1_operator_proto_enumTypes[1] +} + +func (x OperatorState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OperatorState.Descriptor instead. +func (OperatorState) EnumDescriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{1} +} + +type OperatorInstallMethod int32 + +const ( + OperatorInstallMethod_OPERATOR_INSTALL_METHOD_UNSPECIFIED OperatorInstallMethod = 0 + OperatorInstallMethod_OPERATOR_INSTALL_METHOD_MANIFEST OperatorInstallMethod = 1 + OperatorInstallMethod_OPERATOR_INSTALL_METHOD_HELM OperatorInstallMethod = 2 +) + +// Enum value maps for OperatorInstallMethod. +var ( + OperatorInstallMethod_name = map[int32]string{ + 0: "OPERATOR_INSTALL_METHOD_UNSPECIFIED", + 1: "OPERATOR_INSTALL_METHOD_MANIFEST", + 2: "OPERATOR_INSTALL_METHOD_HELM", + } + OperatorInstallMethod_value = map[string]int32{ + "OPERATOR_INSTALL_METHOD_UNSPECIFIED": 0, + "OPERATOR_INSTALL_METHOD_MANIFEST": 1, + "OPERATOR_INSTALL_METHOD_HELM": 2, + } +) + +func (x OperatorInstallMethod) Enum() *OperatorInstallMethod { + p := new(OperatorInstallMethod) + *p = x + return p +} + +func (x OperatorInstallMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OperatorInstallMethod) Descriptor() protoreflect.EnumDescriptor { + return file_api_v1_operator_proto_enumTypes[2].Descriptor() +} + +func (OperatorInstallMethod) Type() protoreflect.EnumType { + return &file_api_v1_operator_proto_enumTypes[2] +} + +func (x OperatorInstallMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OperatorInstallMethod.Descriptor instead. +func (OperatorInstallMethod) EnumDescriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{2} +} + +// Operator describes basic details for any type of operator +type Operator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type OperatorType `protobuf:"varint,1,opt,name=type,proto3,enum=api.v1.OperatorType" json:"type,omitempty"` + InstallMethod OperatorInstallMethod `protobuf:"varint,2,opt,name=install_method,json=installMethod,proto3,enum=api.v1.OperatorInstallMethod" json:"install_method,omitempty"` + State OperatorState `protobuf:"varint,3,opt,name=state,proto3,enum=api.v1.OperatorState" json:"state,omitempty"` + DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` + Commit string `protobuf:"bytes,7,opt,name=commit,proto3" json:"commit,omitempty"` + IsOutdated bool `protobuf:"varint,8,opt,name=is_outdated,json=isOutdated,proto3" json:"is_outdated,omitempty"` + LatestAvailableVersion string `protobuf:"bytes,9,opt,name=latest_available_version,json=latestAvailableVersion,proto3" json:"latest_available_version,omitempty"` + ConnectedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=connected_at,json=connectedAt,proto3" json:"connected_at,omitempty"` +} + +func (x *Operator) Reset() { + *x = Operator{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operator) ProtoMessage() {} + +func (x *Operator) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operator.ProtoReflect.Descriptor instead. +func (*Operator) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{0} +} + +func (x *Operator) GetType() OperatorType { + if x != nil { + return x.Type + } + return OperatorType_OPERATOR_TYPE_UNSPECIFIED +} + +func (x *Operator) GetInstallMethod() OperatorInstallMethod { + if x != nil { + return x.InstallMethod + } + return OperatorInstallMethod_OPERATOR_INSTALL_METHOD_UNSPECIFIED +} + +func (x *Operator) GetState() OperatorState { + if x != nil { + return x.State + } + return OperatorState_OPERATOR_STATE_UNSPECIFIED +} + +func (x *Operator) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Operator) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Operator) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Operator) GetCommit() string { + if x != nil { + return x.Commit + } + return "" +} + +func (x *Operator) GetIsOutdated() bool { + if x != nil { + return x.IsOutdated + } + return false +} + +func (x *Operator) GetLatestAvailableVersion() string { + if x != nil { + return x.LatestAvailableVersion + } + return "" +} + +func (x *Operator) GetConnectedAt() *timestamppb.Timestamp { + if x != nil { + return x.ConnectedAt + } + return nil +} + +// Request and response for GetOperators +type GetOperatorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetOperatorsRequest) Reset() { + *x = GetOperatorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperatorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperatorsRequest) ProtoMessage() {} + +func (x *GetOperatorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOperatorsRequest.ProtoReflect.Descriptor instead. +func (*GetOperatorsRequest) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{1} +} + +type GetOperatorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operators []*Operator `protobuf:"bytes,1,rep,name=operators,proto3" json:"operators,omitempty"` +} + +func (x *GetOperatorsResponse) Reset() { + *x = GetOperatorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperatorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperatorsResponse) ProtoMessage() {} + +func (x *GetOperatorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOperatorsResponse.ProtoReflect.Descriptor instead. +func (*GetOperatorsResponse) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{2} +} + +func (x *GetOperatorsResponse) GetOperators() []*Operator { + if x != nil { + return x.Operators + } + return nil +} + +// ConnectionMetric is reusable for any metric type +type ConnectionMetric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + IsActive bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + LastSeen *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` +} + +func (x *ConnectionMetric) Reset() { + *x = ConnectionMetric{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectionMetric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectionMetric) ProtoMessage() {} + +func (x *ConnectionMetric) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectionMetric.ProtoReflect.Descriptor instead. +func (*ConnectionMetric) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{3} +} + +func (x *ConnectionMetric) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *ConnectionMetric) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ConnectionMetric) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *ConnectionMetric) GetLastSeen() *timestamppb.Timestamp { + if x != nil { + return x.LastSeen + } + return nil +} + +// Request and response for GetOperatorMetadata +type GetOperatorMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type OperatorType `protobuf:"varint,1,opt,name=type,proto3,enum=api.v1.OperatorType" json:"type,omitempty"` + TeamId string `protobuf:"bytes,2,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` +} + +func (x *GetOperatorMetadataRequest) Reset() { + *x = GetOperatorMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperatorMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperatorMetadataRequest) ProtoMessage() {} + +func (x *GetOperatorMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOperatorMetadataRequest.ProtoReflect.Descriptor instead. +func (*GetOperatorMetadataRequest) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{4} +} + +func (x *GetOperatorMetadataRequest) GetType() OperatorType { + if x != nil { + return x.Type + } + return OperatorType_OPERATOR_TYPE_UNSPECIFIED +} + +func (x *GetOperatorMetadataRequest) GetTeamId() string { + if x != nil { + return x.TeamId + } + return "" +} + +func (x *GetOperatorMetadataRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +// Specialized messages for each operator type +type ReadOperator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operator *Operator `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + ContainerMetrics *ConnectionMetric `protobuf:"bytes,2,opt,name=container_metrics,json=containerMetrics,proto3" json:"container_metrics,omitempty"` + NodeMetrics *ConnectionMetric `protobuf:"bytes,3,opt,name=node_metrics,json=nodeMetrics,proto3" json:"node_metrics,omitempty"` + SnapshotMetrics *ConnectionMetric `protobuf:"bytes,4,opt,name=snapshot_metrics,json=snapshotMetrics,proto3" json:"snapshot_metrics,omitempty"` + StorageMetrics *ConnectionMetric `protobuf:"bytes,5,opt,name=storage_metrics,json=storageMetrics,proto3" json:"storage_metrics,omitempty"` +} + +func (x *ReadOperator) Reset() { + *x = ReadOperator{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadOperator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadOperator) ProtoMessage() {} + +func (x *ReadOperator) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadOperator.ProtoReflect.Descriptor instead. +func (*ReadOperator) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{5} +} + +func (x *ReadOperator) GetOperator() *Operator { + if x != nil { + return x.Operator + } + return nil +} + +func (x *ReadOperator) GetContainerMetrics() *ConnectionMetric { + if x != nil { + return x.ContainerMetrics + } + return nil +} + +func (x *ReadOperator) GetNodeMetrics() *ConnectionMetric { + if x != nil { + return x.NodeMetrics + } + return nil +} + +func (x *ReadOperator) GetSnapshotMetrics() *ConnectionMetric { + if x != nil { + return x.SnapshotMetrics + } + return nil +} + +func (x *ReadOperator) GetStorageMetrics() *ConnectionMetric { + if x != nil { + return x.StorageMetrics + } + return nil +} + +type WriteOperator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operator *Operator `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + RecommendationMetrics *ConnectionMetric `protobuf:"bytes,2,opt,name=recommendation_metrics,json=recommendationMetrics,proto3" json:"recommendation_metrics,omitempty"` +} + +func (x *WriteOperator) Reset() { + *x = WriteOperator{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteOperator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteOperator) ProtoMessage() {} + +func (x *WriteOperator) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteOperator.ProtoReflect.Descriptor instead. +func (*WriteOperator) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{6} +} + +func (x *WriteOperator) GetOperator() *Operator { + if x != nil { + return x.Operator + } + return nil +} + +func (x *WriteOperator) GetRecommendationMetrics() *ConnectionMetric { + if x != nil { + return x.RecommendationMetrics + } + return nil +} + +type NodeOperator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operator *Operator `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + KarpenterDeployment *ConnectionMetric `protobuf:"bytes,2,opt,name=karpenter_deployment,json=karpenterDeployment,proto3" json:"karpenter_deployment,omitempty"` + NodeProvisioning *ConnectionMetric `protobuf:"bytes,3,opt,name=node_provisioning,json=nodeProvisioning,proto3" json:"node_provisioning,omitempty"` +} + +func (x *NodeOperator) Reset() { + *x = NodeOperator{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeOperator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeOperator) ProtoMessage() {} + +func (x *NodeOperator) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeOperator.ProtoReflect.Descriptor instead. +func (*NodeOperator) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{7} +} + +func (x *NodeOperator) GetOperator() *Operator { + if x != nil { + return x.Operator + } + return nil +} + +func (x *NodeOperator) GetKarpenterDeployment() *ConnectionMetric { + if x != nil { + return x.KarpenterDeployment + } + return nil +} + +func (x *NodeOperator) GetNodeProvisioning() *ConnectionMetric { + if x != nil { + return x.NodeProvisioning + } + return nil +} + +type SecurityOperator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operator *Operator `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + SecurityMetrics *ConnectionMetric `protobuf:"bytes,2,opt,name=security_metrics,json=securityMetrics,proto3" json:"security_metrics,omitempty"` +} + +func (x *SecurityOperator) Reset() { + *x = SecurityOperator{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityOperator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityOperator) ProtoMessage() {} + +func (x *SecurityOperator) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityOperator.ProtoReflect.Descriptor instead. +func (*SecurityOperator) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{8} +} + +func (x *SecurityOperator) GetOperator() *Operator { + if x != nil { + return x.Operator + } + return nil +} + +func (x *SecurityOperator) GetSecurityMetrics() *ConnectionMetric { + if x != nil { + return x.SecurityMetrics + } + return nil +} + +type NetworkOperator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operator *Operator `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + NetworkMetrics *ConnectionMetric `protobuf:"bytes,2,opt,name=network_metrics,json=networkMetrics,proto3" json:"network_metrics,omitempty"` +} + +func (x *NetworkOperator) Reset() { + *x = NetworkOperator{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkOperator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkOperator) ProtoMessage() {} + +func (x *NetworkOperator) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkOperator.ProtoReflect.Descriptor instead. +func (*NetworkOperator) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{9} +} + +func (x *NetworkOperator) GetOperator() *Operator { + if x != nil { + return x.Operator + } + return nil +} + +func (x *NetworkOperator) GetNetworkMetrics() *ConnectionMetric { + if x != nil { + return x.NetworkMetrics + } + return nil +} + +// Oneof response to clarify returned operator type +type GetOperatorMetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Operator: + // + // *GetOperatorMetadataResponse_ReadOperator + // *GetOperatorMetadataResponse_WriteOperator + // *GetOperatorMetadataResponse_NodeOperator + // *GetOperatorMetadataResponse_SecurityOperator + // *GetOperatorMetadataResponse_NetworkOperator + Operator isGetOperatorMetadataResponse_Operator `protobuf_oneof:"operator"` +} + +func (x *GetOperatorMetadataResponse) Reset() { + *x = GetOperatorMetadataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperatorMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperatorMetadataResponse) ProtoMessage() {} + +func (x *GetOperatorMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOperatorMetadataResponse.ProtoReflect.Descriptor instead. +func (*GetOperatorMetadataResponse) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{10} +} + +func (m *GetOperatorMetadataResponse) GetOperator() isGetOperatorMetadataResponse_Operator { + if m != nil { + return m.Operator + } + return nil +} + +func (x *GetOperatorMetadataResponse) GetReadOperator() *ReadOperator { + if x, ok := x.GetOperator().(*GetOperatorMetadataResponse_ReadOperator); ok { + return x.ReadOperator + } + return nil +} + +func (x *GetOperatorMetadataResponse) GetWriteOperator() *WriteOperator { + if x, ok := x.GetOperator().(*GetOperatorMetadataResponse_WriteOperator); ok { + return x.WriteOperator + } + return nil +} + +func (x *GetOperatorMetadataResponse) GetNodeOperator() *NodeOperator { + if x, ok := x.GetOperator().(*GetOperatorMetadataResponse_NodeOperator); ok { + return x.NodeOperator + } + return nil +} + +func (x *GetOperatorMetadataResponse) GetSecurityOperator() *SecurityOperator { + if x, ok := x.GetOperator().(*GetOperatorMetadataResponse_SecurityOperator); ok { + return x.SecurityOperator + } + return nil +} + +func (x *GetOperatorMetadataResponse) GetNetworkOperator() *NetworkOperator { + if x, ok := x.GetOperator().(*GetOperatorMetadataResponse_NetworkOperator); ok { + return x.NetworkOperator + } + return nil +} + +type isGetOperatorMetadataResponse_Operator interface { + isGetOperatorMetadataResponse_Operator() +} + +type GetOperatorMetadataResponse_ReadOperator struct { + ReadOperator *ReadOperator `protobuf:"bytes,1,opt,name=read_operator,json=readOperator,proto3,oneof"` +} + +type GetOperatorMetadataResponse_WriteOperator struct { + WriteOperator *WriteOperator `protobuf:"bytes,2,opt,name=write_operator,json=writeOperator,proto3,oneof"` +} + +type GetOperatorMetadataResponse_NodeOperator struct { + NodeOperator *NodeOperator `protobuf:"bytes,3,opt,name=node_operator,json=nodeOperator,proto3,oneof"` +} + +type GetOperatorMetadataResponse_SecurityOperator struct { + SecurityOperator *SecurityOperator `protobuf:"bytes,4,opt,name=security_operator,json=securityOperator,proto3,oneof"` +} + +type GetOperatorMetadataResponse_NetworkOperator struct { + NetworkOperator *NetworkOperator `protobuf:"bytes,5,opt,name=network_operator,json=networkOperator,proto3,oneof"` +} + +func (*GetOperatorMetadataResponse_ReadOperator) isGetOperatorMetadataResponse_Operator() {} + +func (*GetOperatorMetadataResponse_WriteOperator) isGetOperatorMetadataResponse_Operator() {} + +func (*GetOperatorMetadataResponse_NodeOperator) isGetOperatorMetadataResponse_Operator() {} + +func (*GetOperatorMetadataResponse_SecurityOperator) isGetOperatorMetadataResponse_Operator() {} + +func (*GetOperatorMetadataResponse_NetworkOperator) isGetOperatorMetadataResponse_Operator() {} + +type GetOCIRegistriesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + ClusterId string `protobuf:"bytes,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` +} + +func (x *GetOCIRegistriesRequest) Reset() { + *x = GetOCIRegistriesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOCIRegistriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOCIRegistriesRequest) ProtoMessage() {} + +func (x *GetOCIRegistriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOCIRegistriesRequest.ProtoReflect.Descriptor instead. +func (*GetOCIRegistriesRequest) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{11} +} + +func (x *GetOCIRegistriesRequest) GetTeamId() string { + if x != nil { + return x.TeamId + } + return "" +} + +func (x *GetOCIRegistriesRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +// RegistryMirrorConfig represents a complete registry mirror configuration +type RegistryMirrorConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Registry name (e.g., "dockerhub", "ghcr") + Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` // Whether this registry should be enabled + Upstream string `protobuf:"bytes,3,opt,name=upstream,proto3" json:"upstream,omitempty"` // Upstream registry URL (e.g., "https://registry-1.docker.io") + MirrorFor []string `protobuf:"bytes,4,rep,name=mirror_for,json=mirrorFor,proto3" json:"mirror_for,omitempty"` // List of domains to mirror (e.g., ["docker.io", "index.docker.io"]) + Ttl string `protobuf:"bytes,5,opt,name=ttl,proto3" json:"ttl,omitempty"` // Time-to-live for cached images (e.g., "168h") +} + +func (x *RegistryMirrorConfig) Reset() { + *x = RegistryMirrorConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistryMirrorConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistryMirrorConfig) ProtoMessage() {} + +func (x *RegistryMirrorConfig) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegistryMirrorConfig.ProtoReflect.Descriptor instead. +func (*RegistryMirrorConfig) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{12} +} + +func (x *RegistryMirrorConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RegistryMirrorConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *RegistryMirrorConfig) GetUpstream() string { + if x != nil { + return x.Upstream + } + return "" +} + +func (x *RegistryMirrorConfig) GetMirrorFor() []string { + if x != nil { + return x.MirrorFor + } + return nil +} + +func (x *RegistryMirrorConfig) GetTtl() string { + if x != nil { + return x.Ttl + } + return "" +} + +type GetOCIRegistriesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RegistryConfigs []*RegistryMirrorConfig `protobuf:"bytes,1,rep,name=registry_configs,json=registryConfigs,proto3" json:"registry_configs,omitempty"` +} + +func (x *GetOCIRegistriesResponse) Reset() { + *x = GetOCIRegistriesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOCIRegistriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOCIRegistriesResponse) ProtoMessage() {} + +func (x *GetOCIRegistriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOCIRegistriesResponse.ProtoReflect.Descriptor instead. +func (*GetOCIRegistriesResponse) Descriptor() ([]byte, []int) { + return file_api_v1_operator_proto_rawDescGZIP(), []int{13} +} + +func (x *GetOCIRegistriesResponse) GetRegistryConfigs() []*RegistryMirrorConfig { + if x != nil { + return x.RegistryConfigs + } + return nil +} + +var File_api_v1_operator_proto protoreflect.FileDescriptor + +var file_api_v1_operator_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xb8, 0x03, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x28, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0d, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2b, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0c, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x46, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x10, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x12, 0x37, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x22, 0x7e, 0x0a, 0x1a, 0x47, 0x65, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0xc8, 0x02, 0x0a, 0x0c, 0x52, + 0x65, 0x61, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x08, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x11, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x10, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x12, 0x3b, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x43, 0x0a, + 0x10, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x0f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4f, 0x0a, 0x16, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, + 0x15, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4b, 0x0a, 0x14, 0x6b, 0x61, 0x72, 0x70, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x13, 0x6b, + 0x61, 0x72, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x10, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, + 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x10, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xf2, 0x02, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x0e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x47, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x10, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x42, + 0x0a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x51, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x4f, 0x43, 0x49, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x91, + 0x01, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x4d, 0x69, 0x72, 0x72, 0x6f, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x46, 0x6f, 0x72, + 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, + 0x74, 0x6c, 0x22, 0x63, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4f, 0x43, 0x49, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, + 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x2a, 0xad, 0x01, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x50, 0x45, 0x52, + 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x45, 0x52, 0x41, + 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x45, 0x52, + 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x03, + 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, + 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, + 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x05, 0x2a, 0xa3, 0x01, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x50, 0x45, + 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x50, 0x45, + 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x41, + 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, + 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, + 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x47, 0x52, 0x41, 0x44, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x2a, 0x88, 0x01, + 0x0a, 0x15, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x27, 0x0a, 0x23, 0x4f, 0x50, 0x45, 0x52, 0x41, + 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x5f, 0x4d, 0x45, 0x54, 0x48, + 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x24, 0x0a, 0x20, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, + 0x54, 0x41, 0x4c, 0x4c, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x41, 0x4e, 0x49, + 0x46, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, + 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, + 0x44, 0x5f, 0x48, 0x45, 0x4c, 0x4d, 0x10, 0x02, 0x32, 0x93, 0x02, 0x0a, 0x0f, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x22, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x43, + 0x49, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x43, 0x49, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x43, 0x49, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x86, + 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x76, 0x7a, 0x65, + 0x72, 0x6f, 0x2d, 0x69, 0x6e, 0x63, 0x2f, 0x7a, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x06, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x41, 0x70, 0x69, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, + 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_v1_operator_proto_rawDescOnce sync.Once + file_api_v1_operator_proto_rawDescData = file_api_v1_operator_proto_rawDesc +) + +func file_api_v1_operator_proto_rawDescGZIP() []byte { + file_api_v1_operator_proto_rawDescOnce.Do(func() { + file_api_v1_operator_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_operator_proto_rawDescData) + }) + return file_api_v1_operator_proto_rawDescData +} + +var file_api_v1_operator_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_api_v1_operator_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_api_v1_operator_proto_goTypes = []interface{}{ + (OperatorType)(0), // 0: api.v1.OperatorType + (OperatorState)(0), // 1: api.v1.OperatorState + (OperatorInstallMethod)(0), // 2: api.v1.OperatorInstallMethod + (*Operator)(nil), // 3: api.v1.Operator + (*GetOperatorsRequest)(nil), // 4: api.v1.GetOperatorsRequest + (*GetOperatorsResponse)(nil), // 5: api.v1.GetOperatorsResponse + (*ConnectionMetric)(nil), // 6: api.v1.ConnectionMetric + (*GetOperatorMetadataRequest)(nil), // 7: api.v1.GetOperatorMetadataRequest + (*ReadOperator)(nil), // 8: api.v1.ReadOperator + (*WriteOperator)(nil), // 9: api.v1.WriteOperator + (*NodeOperator)(nil), // 10: api.v1.NodeOperator + (*SecurityOperator)(nil), // 11: api.v1.SecurityOperator + (*NetworkOperator)(nil), // 12: api.v1.NetworkOperator + (*GetOperatorMetadataResponse)(nil), // 13: api.v1.GetOperatorMetadataResponse + (*GetOCIRegistriesRequest)(nil), // 14: api.v1.GetOCIRegistriesRequest + (*RegistryMirrorConfig)(nil), // 15: api.v1.RegistryMirrorConfig + (*GetOCIRegistriesResponse)(nil), // 16: api.v1.GetOCIRegistriesResponse + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp +} +var file_api_v1_operator_proto_depIdxs = []int32{ + 0, // 0: api.v1.Operator.type:type_name -> api.v1.OperatorType + 2, // 1: api.v1.Operator.install_method:type_name -> api.v1.OperatorInstallMethod + 1, // 2: api.v1.Operator.state:type_name -> api.v1.OperatorState + 17, // 3: api.v1.Operator.connected_at:type_name -> google.protobuf.Timestamp + 3, // 4: api.v1.GetOperatorsResponse.operators:type_name -> api.v1.Operator + 17, // 5: api.v1.ConnectionMetric.last_seen:type_name -> google.protobuf.Timestamp + 0, // 6: api.v1.GetOperatorMetadataRequest.type:type_name -> api.v1.OperatorType + 3, // 7: api.v1.ReadOperator.operator:type_name -> api.v1.Operator + 6, // 8: api.v1.ReadOperator.container_metrics:type_name -> api.v1.ConnectionMetric + 6, // 9: api.v1.ReadOperator.node_metrics:type_name -> api.v1.ConnectionMetric + 6, // 10: api.v1.ReadOperator.snapshot_metrics:type_name -> api.v1.ConnectionMetric + 6, // 11: api.v1.ReadOperator.storage_metrics:type_name -> api.v1.ConnectionMetric + 3, // 12: api.v1.WriteOperator.operator:type_name -> api.v1.Operator + 6, // 13: api.v1.WriteOperator.recommendation_metrics:type_name -> api.v1.ConnectionMetric + 3, // 14: api.v1.NodeOperator.operator:type_name -> api.v1.Operator + 6, // 15: api.v1.NodeOperator.karpenter_deployment:type_name -> api.v1.ConnectionMetric + 6, // 16: api.v1.NodeOperator.node_provisioning:type_name -> api.v1.ConnectionMetric + 3, // 17: api.v1.SecurityOperator.operator:type_name -> api.v1.Operator + 6, // 18: api.v1.SecurityOperator.security_metrics:type_name -> api.v1.ConnectionMetric + 3, // 19: api.v1.NetworkOperator.operator:type_name -> api.v1.Operator + 6, // 20: api.v1.NetworkOperator.network_metrics:type_name -> api.v1.ConnectionMetric + 8, // 21: api.v1.GetOperatorMetadataResponse.read_operator:type_name -> api.v1.ReadOperator + 9, // 22: api.v1.GetOperatorMetadataResponse.write_operator:type_name -> api.v1.WriteOperator + 10, // 23: api.v1.GetOperatorMetadataResponse.node_operator:type_name -> api.v1.NodeOperator + 11, // 24: api.v1.GetOperatorMetadataResponse.security_operator:type_name -> api.v1.SecurityOperator + 12, // 25: api.v1.GetOperatorMetadataResponse.network_operator:type_name -> api.v1.NetworkOperator + 15, // 26: api.v1.GetOCIRegistriesResponse.registry_configs:type_name -> api.v1.RegistryMirrorConfig + 4, // 27: api.v1.OperatorService.GetOperators:input_type -> api.v1.GetOperatorsRequest + 7, // 28: api.v1.OperatorService.GetOperatorMetadata:input_type -> api.v1.GetOperatorMetadataRequest + 14, // 29: api.v1.OperatorService.GetOCIRegistries:input_type -> api.v1.GetOCIRegistriesRequest + 5, // 30: api.v1.OperatorService.GetOperators:output_type -> api.v1.GetOperatorsResponse + 13, // 31: api.v1.OperatorService.GetOperatorMetadata:output_type -> api.v1.GetOperatorMetadataResponse + 16, // 32: api.v1.OperatorService.GetOCIRegistries:output_type -> api.v1.GetOCIRegistriesResponse + 30, // [30:33] is the sub-list for method output_type + 27, // [27:30] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name +} + +func init() { file_api_v1_operator_proto_init() } +func file_api_v1_operator_proto_init() { + if File_api_v1_operator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_api_v1_operator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOperatorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOperatorsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectionMetric); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOperatorMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadOperator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteOperator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeOperator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityOperator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkOperator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOperatorMetadataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOCIRegistriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistryMirrorConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOCIRegistriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_api_v1_operator_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*GetOperatorMetadataResponse_ReadOperator)(nil), + (*GetOperatorMetadataResponse_WriteOperator)(nil), + (*GetOperatorMetadataResponse_NodeOperator)(nil), + (*GetOperatorMetadataResponse_SecurityOperator)(nil), + (*GetOperatorMetadataResponse_NetworkOperator)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_v1_operator_proto_rawDesc, + NumEnums: 3, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_v1_operator_proto_goTypes, + DependencyIndexes: file_api_v1_operator_proto_depIdxs, + EnumInfos: file_api_v1_operator_proto_enumTypes, + MessageInfos: file_api_v1_operator_proto_msgTypes, + }.Build() + File_api_v1_operator_proto = out.File + file_api_v1_operator_proto_rawDesc = nil + file_api_v1_operator_proto_goTypes = nil + file_api_v1_operator_proto_depIdxs = nil +} diff --git a/gen/api/v1/operator_grpc.pb.go b/gen/api/v1/operator_grpc.pb.go new file mode 100644 index 00000000..9dccf734 --- /dev/null +++ b/gen/api/v1/operator_grpc.pb.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: api/v1/operator.proto + +package apiv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + OperatorService_GetOperators_FullMethodName = "/api.v1.OperatorService/GetOperators" + OperatorService_GetOperatorMetadata_FullMethodName = "/api.v1.OperatorService/GetOperatorMetadata" + OperatorService_GetOCIRegistries_FullMethodName = "/api.v1.OperatorService/GetOCIRegistries" +) + +// OperatorServiceClient is the client API for OperatorService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OperatorServiceClient interface { + GetOperators(ctx context.Context, in *GetOperatorsRequest, opts ...grpc.CallOption) (*GetOperatorsResponse, error) + GetOperatorMetadata(ctx context.Context, in *GetOperatorMetadataRequest, opts ...grpc.CallOption) (*GetOperatorMetadataResponse, error) + GetOCIRegistries(ctx context.Context, in *GetOCIRegistriesRequest, opts ...grpc.CallOption) (*GetOCIRegistriesResponse, error) +} + +type operatorServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewOperatorServiceClient(cc grpc.ClientConnInterface) OperatorServiceClient { + return &operatorServiceClient{cc} +} + +func (c *operatorServiceClient) GetOperators(ctx context.Context, in *GetOperatorsRequest, opts ...grpc.CallOption) (*GetOperatorsResponse, error) { + out := new(GetOperatorsResponse) + err := c.cc.Invoke(ctx, OperatorService_GetOperators_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operatorServiceClient) GetOperatorMetadata(ctx context.Context, in *GetOperatorMetadataRequest, opts ...grpc.CallOption) (*GetOperatorMetadataResponse, error) { + out := new(GetOperatorMetadataResponse) + err := c.cc.Invoke(ctx, OperatorService_GetOperatorMetadata_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operatorServiceClient) GetOCIRegistries(ctx context.Context, in *GetOCIRegistriesRequest, opts ...grpc.CallOption) (*GetOCIRegistriesResponse, error) { + out := new(GetOCIRegistriesResponse) + err := c.cc.Invoke(ctx, OperatorService_GetOCIRegistries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OperatorServiceServer is the server API for OperatorService service. +// All implementations must embed UnimplementedOperatorServiceServer +// for forward compatibility +type OperatorServiceServer interface { + GetOperators(context.Context, *GetOperatorsRequest) (*GetOperatorsResponse, error) + GetOperatorMetadata(context.Context, *GetOperatorMetadataRequest) (*GetOperatorMetadataResponse, error) + GetOCIRegistries(context.Context, *GetOCIRegistriesRequest) (*GetOCIRegistriesResponse, error) + mustEmbedUnimplementedOperatorServiceServer() +} + +// UnimplementedOperatorServiceServer must be embedded to have forward compatible implementations. +type UnimplementedOperatorServiceServer struct { +} + +func (UnimplementedOperatorServiceServer) GetOperators(context.Context, *GetOperatorsRequest) (*GetOperatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOperators not implemented") +} +func (UnimplementedOperatorServiceServer) GetOperatorMetadata(context.Context, *GetOperatorMetadataRequest) (*GetOperatorMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOperatorMetadata not implemented") +} +func (UnimplementedOperatorServiceServer) GetOCIRegistries(context.Context, *GetOCIRegistriesRequest) (*GetOCIRegistriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOCIRegistries not implemented") +} +func (UnimplementedOperatorServiceServer) mustEmbedUnimplementedOperatorServiceServer() {} + +// UnsafeOperatorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OperatorServiceServer will +// result in compilation errors. +type UnsafeOperatorServiceServer interface { + mustEmbedUnimplementedOperatorServiceServer() +} + +func RegisterOperatorServiceServer(s grpc.ServiceRegistrar, srv OperatorServiceServer) { + s.RegisterService(&OperatorService_ServiceDesc, srv) +} + +func _OperatorService_GetOperators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperatorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperatorServiceServer).GetOperators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperatorService_GetOperators_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperatorServiceServer).GetOperators(ctx, req.(*GetOperatorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OperatorService_GetOperatorMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperatorMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperatorServiceServer).GetOperatorMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperatorService_GetOperatorMetadata_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperatorServiceServer).GetOperatorMetadata(ctx, req.(*GetOperatorMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OperatorService_GetOCIRegistries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOCIRegistriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperatorServiceServer).GetOCIRegistries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperatorService_GetOCIRegistries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperatorServiceServer).GetOCIRegistries(ctx, req.(*GetOCIRegistriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OperatorService_ServiceDesc is the grpc.ServiceDesc for OperatorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OperatorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.OperatorService", + HandlerType: (*OperatorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetOperators", + Handler: _OperatorService_GetOperators_Handler, + }, + { + MethodName: "GetOperatorMetadata", + Handler: _OperatorService_GetOperatorMetadata_Handler, + }, + { + MethodName: "GetOCIRegistries", + Handler: _OperatorService_GetOCIRegistries_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api/v1/operator.proto", +} diff --git a/gen/api/v1/operator_health.pb.go b/gen/api/v1/operator_health.pb.go new file mode 100644 index 00000000..fb90cabe --- /dev/null +++ b/gen/api/v1/operator_health.pb.go @@ -0,0 +1,713 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: api/v1/operator_health.proto + +package apiv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +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 HealthStatus int32 + +const ( + HealthStatus_HEALTH_STATUS_UNSPECIFIED HealthStatus = 0 + HealthStatus_HEALTH_STATUS_HEALTHY HealthStatus = 1 + HealthStatus_HEALTH_STATUS_DEGRADED HealthStatus = 2 + HealthStatus_HEALTH_STATUS_UNHEALTHY HealthStatus = 3 +) + +// Enum value maps for HealthStatus. +var ( + HealthStatus_name = map[int32]string{ + 0: "HEALTH_STATUS_UNSPECIFIED", + 1: "HEALTH_STATUS_HEALTHY", + 2: "HEALTH_STATUS_DEGRADED", + 3: "HEALTH_STATUS_UNHEALTHY", + } + HealthStatus_value = map[string]int32{ + "HEALTH_STATUS_UNSPECIFIED": 0, + "HEALTH_STATUS_HEALTHY": 1, + "HEALTH_STATUS_DEGRADED": 2, + "HEALTH_STATUS_UNHEALTHY": 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_api_v1_operator_health_proto_enumTypes[0].Descriptor() +} + +func (HealthStatus) Type() protoreflect.EnumType { + return &file_api_v1_operator_health_proto_enumTypes[0] +} + +func (x HealthStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HealthStatus.Descriptor instead. +func (HealthStatus) EnumDescriptor() ([]byte, []int) { + return file_api_v1_operator_health_proto_rawDescGZIP(), []int{0} +} + +type ComponentHealth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Status HealthStatus `protobuf:"varint,2,opt,name=status,proto3,enum=api.v1.HealthStatus" json:"status,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ComponentHealth) Reset() { + *x = ComponentHealth{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_health_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComponentHealth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComponentHealth) ProtoMessage() {} + +func (x *ComponentHealth) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_health_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComponentHealth.ProtoReflect.Descriptor instead. +func (*ComponentHealth) Descriptor() ([]byte, []int) { + return file_api_v1_operator_health_proto_rawDescGZIP(), []int{0} +} + +func (x *ComponentHealth) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ComponentHealth) GetStatus() HealthStatus { + if x != nil { + return x.Status + } + return HealthStatus_HEALTH_STATUS_UNSPECIFIED +} + +func (x *ComponentHealth) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ComponentHealth) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +type ReportHealthRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` + OperatorType OperatorType `protobuf:"varint,2,opt,name=operator_type,json=operatorType,proto3,enum=api.v1.OperatorType" json:"operator_type,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + OverallStatus HealthStatus `protobuf:"varint,4,opt,name=overall_status,json=overallStatus,proto3,enum=api.v1.HealthStatus" json:"overall_status,omitempty"` + Components []*ComponentHealth `protobuf:"bytes,5,rep,name=components,proto3" json:"components,omitempty"` + UptimeSince *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=uptime_since,json=uptimeSince,proto3" json:"uptime_since,omitempty"` +} + +func (x *ReportHealthRequest) Reset() { + *x = ReportHealthRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_health_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReportHealthRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportHealthRequest) ProtoMessage() {} + +func (x *ReportHealthRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_health_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportHealthRequest.ProtoReflect.Descriptor instead. +func (*ReportHealthRequest) Descriptor() ([]byte, []int) { + return file_api_v1_operator_health_proto_rawDescGZIP(), []int{1} +} + +func (x *ReportHealthRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +func (x *ReportHealthRequest) GetOperatorType() OperatorType { + if x != nil { + return x.OperatorType + } + return OperatorType_OPERATOR_TYPE_UNSPECIFIED +} + +func (x *ReportHealthRequest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ReportHealthRequest) GetOverallStatus() HealthStatus { + if x != nil { + return x.OverallStatus + } + return HealthStatus_HEALTH_STATUS_UNSPECIFIED +} + +func (x *ReportHealthRequest) GetComponents() []*ComponentHealth { + if x != nil { + return x.Components + } + return nil +} + +func (x *ReportHealthRequest) GetUptimeSince() *timestamppb.Timestamp { + if x != nil { + return x.UptimeSince + } + return nil +} + +type ReportHealthResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReportHealthResponse) Reset() { + *x = ReportHealthResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_health_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReportHealthResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportHealthResponse) ProtoMessage() {} + +func (x *ReportHealthResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_health_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportHealthResponse.ProtoReflect.Descriptor instead. +func (*ReportHealthResponse) Descriptor() ([]byte, []int) { + return file_api_v1_operator_health_proto_rawDescGZIP(), []int{2} +} + +type GetClusterOperatorHealthRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` +} + +func (x *GetClusterOperatorHealthRequest) Reset() { + *x = GetClusterOperatorHealthRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_health_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterOperatorHealthRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterOperatorHealthRequest) ProtoMessage() {} + +func (x *GetClusterOperatorHealthRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_health_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterOperatorHealthRequest.ProtoReflect.Descriptor instead. +func (*GetClusterOperatorHealthRequest) Descriptor() ([]byte, []int) { + return file_api_v1_operator_health_proto_rawDescGZIP(), []int{3} +} + +func (x *GetClusterOperatorHealthRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +type GetClusterOperatorHealthResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operators []*OperatorHealthStatus `protobuf:"bytes,1,rep,name=operators,proto3" json:"operators,omitempty"` +} + +func (x *GetClusterOperatorHealthResponse) Reset() { + *x = GetClusterOperatorHealthResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_health_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterOperatorHealthResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterOperatorHealthResponse) ProtoMessage() {} + +func (x *GetClusterOperatorHealthResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_health_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterOperatorHealthResponse.ProtoReflect.Descriptor instead. +func (*GetClusterOperatorHealthResponse) Descriptor() ([]byte, []int) { + return file_api_v1_operator_health_proto_rawDescGZIP(), []int{4} +} + +func (x *GetClusterOperatorHealthResponse) GetOperators() []*OperatorHealthStatus { + if x != nil { + return x.Operators + } + return nil +} + +type OperatorHealthStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OperatorType OperatorType `protobuf:"varint,1,opt,name=operator_type,json=operatorType,proto3,enum=api.v1.OperatorType" json:"operator_type,omitempty"` + OverallStatus HealthStatus `protobuf:"varint,2,opt,name=overall_status,json=overallStatus,proto3,enum=api.v1.HealthStatus" json:"overall_status,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + LastHeartbeat *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_heartbeat,json=lastHeartbeat,proto3" json:"last_heartbeat,omitempty"` + UptimeSince *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=uptime_since,json=uptimeSince,proto3" json:"uptime_since,omitempty"` + Components []*ComponentHealth `protobuf:"bytes,6,rep,name=components,proto3" json:"components,omitempty"` +} + +func (x *OperatorHealthStatus) Reset() { + *x = OperatorHealthStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_operator_health_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperatorHealthStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperatorHealthStatus) ProtoMessage() {} + +func (x *OperatorHealthStatus) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_operator_health_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperatorHealthStatus.ProtoReflect.Descriptor instead. +func (*OperatorHealthStatus) Descriptor() ([]byte, []int) { + return file_api_v1_operator_health_proto_rawDescGZIP(), []int{5} +} + +func (x *OperatorHealthStatus) GetOperatorType() OperatorType { + if x != nil { + return x.OperatorType + } + return OperatorType_OPERATOR_TYPE_UNSPECIFIED +} + +func (x *OperatorHealthStatus) GetOverallStatus() HealthStatus { + if x != nil { + return x.OverallStatus + } + return HealthStatus_HEALTH_STATUS_UNSPECIFIED +} + +func (x *OperatorHealthStatus) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *OperatorHealthStatus) GetLastHeartbeat() *timestamppb.Timestamp { + if x != nil { + return x.LastHeartbeat + } + return nil +} + +func (x *OperatorHealthStatus) GetUptimeSince() *timestamppb.Timestamp { + if x != nil { + return x.UptimeSince + } + return nil +} + +func (x *OperatorHealthStatus) GetComponents() []*ComponentHealth { + if x != nil { + return x.Components + } + return nil +} + +var File_api_v1_operator_health_proto protoreflect.FileDescriptor + +var file_api_v1_operator_health_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, + 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x41, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbe, + 0x02, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0e, 0x6f, 0x76, + 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, + 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x22, + 0x16, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5e, 0x0a, 0x20, 0x47, 0x65, 0x74, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xe3, 0x02, 0x0a, 0x14, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, + 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x6f, 0x76, 0x65, + 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, + 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2a, + 0x81, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1d, 0x0a, 0x19, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x19, 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x48, 0x45, + 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x47, 0x52, + 0x41, 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, + 0x59, 0x10, 0x03, 0x32, 0xd1, 0x01, 0x0a, 0x15, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, + 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1b, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x8c, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x76, 0x7a, 0x65, 0x72, + 0x6f, 0x2d, 0x69, 0x6e, 0x63, 0x2f, 0x7a, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x06, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x41, + 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_v1_operator_health_proto_rawDescOnce sync.Once + file_api_v1_operator_health_proto_rawDescData = file_api_v1_operator_health_proto_rawDesc +) + +func file_api_v1_operator_health_proto_rawDescGZIP() []byte { + file_api_v1_operator_health_proto_rawDescOnce.Do(func() { + file_api_v1_operator_health_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_operator_health_proto_rawDescData) + }) + return file_api_v1_operator_health_proto_rawDescData +} + +var file_api_v1_operator_health_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_api_v1_operator_health_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_api_v1_operator_health_proto_goTypes = []interface{}{ + (HealthStatus)(0), // 0: api.v1.HealthStatus + (*ComponentHealth)(nil), // 1: api.v1.ComponentHealth + (*ReportHealthRequest)(nil), // 2: api.v1.ReportHealthRequest + (*ReportHealthResponse)(nil), // 3: api.v1.ReportHealthResponse + (*GetClusterOperatorHealthRequest)(nil), // 4: api.v1.GetClusterOperatorHealthRequest + (*GetClusterOperatorHealthResponse)(nil), // 5: api.v1.GetClusterOperatorHealthResponse + (*OperatorHealthStatus)(nil), // 6: api.v1.OperatorHealthStatus + nil, // 7: api.v1.ComponentHealth.MetadataEntry + (OperatorType)(0), // 8: api.v1.OperatorType + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp +} +var file_api_v1_operator_health_proto_depIdxs = []int32{ + 0, // 0: api.v1.ComponentHealth.status:type_name -> api.v1.HealthStatus + 7, // 1: api.v1.ComponentHealth.metadata:type_name -> api.v1.ComponentHealth.MetadataEntry + 8, // 2: api.v1.ReportHealthRequest.operator_type:type_name -> api.v1.OperatorType + 0, // 3: api.v1.ReportHealthRequest.overall_status:type_name -> api.v1.HealthStatus + 1, // 4: api.v1.ReportHealthRequest.components:type_name -> api.v1.ComponentHealth + 9, // 5: api.v1.ReportHealthRequest.uptime_since:type_name -> google.protobuf.Timestamp + 6, // 6: api.v1.GetClusterOperatorHealthResponse.operators:type_name -> api.v1.OperatorHealthStatus + 8, // 7: api.v1.OperatorHealthStatus.operator_type:type_name -> api.v1.OperatorType + 0, // 8: api.v1.OperatorHealthStatus.overall_status:type_name -> api.v1.HealthStatus + 9, // 9: api.v1.OperatorHealthStatus.last_heartbeat:type_name -> google.protobuf.Timestamp + 9, // 10: api.v1.OperatorHealthStatus.uptime_since:type_name -> google.protobuf.Timestamp + 1, // 11: api.v1.OperatorHealthStatus.components:type_name -> api.v1.ComponentHealth + 2, // 12: api.v1.OperatorHealthService.ReportHealth:input_type -> api.v1.ReportHealthRequest + 4, // 13: api.v1.OperatorHealthService.GetClusterOperatorHealth:input_type -> api.v1.GetClusterOperatorHealthRequest + 3, // 14: api.v1.OperatorHealthService.ReportHealth:output_type -> api.v1.ReportHealthResponse + 5, // 15: api.v1.OperatorHealthService.GetClusterOperatorHealth:output_type -> api.v1.GetClusterOperatorHealthResponse + 14, // [14:16] is the sub-list for method output_type + 12, // [12:14] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_api_v1_operator_health_proto_init() } +func file_api_v1_operator_health_proto_init() { + if File_api_v1_operator_health_proto != nil { + return + } + file_api_v1_operator_proto_init() + if !protoimpl.UnsafeEnabled { + file_api_v1_operator_health_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComponentHealth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_health_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReportHealthRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_health_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReportHealthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_health_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClusterOperatorHealthRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_health_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClusterOperatorHealthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_operator_health_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperatorHealthStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_v1_operator_health_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_v1_operator_health_proto_goTypes, + DependencyIndexes: file_api_v1_operator_health_proto_depIdxs, + EnumInfos: file_api_v1_operator_health_proto_enumTypes, + MessageInfos: file_api_v1_operator_health_proto_msgTypes, + }.Build() + File_api_v1_operator_health_proto = out.File + file_api_v1_operator_health_proto_rawDesc = nil + file_api_v1_operator_health_proto_goTypes = nil + file_api_v1_operator_health_proto_depIdxs = nil +} diff --git a/gen/api/v1/operator_health_grpc.pb.go b/gen/api/v1/operator_health_grpc.pb.go new file mode 100644 index 00000000..81ea9925 --- /dev/null +++ b/gen/api/v1/operator_health_grpc.pb.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: api/v1/operator_health.proto + +package apiv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + OperatorHealthService_ReportHealth_FullMethodName = "/api.v1.OperatorHealthService/ReportHealth" + OperatorHealthService_GetClusterOperatorHealth_FullMethodName = "/api.v1.OperatorHealthService/GetClusterOperatorHealth" +) + +// OperatorHealthServiceClient is the client API for OperatorHealthService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OperatorHealthServiceClient interface { + ReportHealth(ctx context.Context, in *ReportHealthRequest, opts ...grpc.CallOption) (*ReportHealthResponse, error) + GetClusterOperatorHealth(ctx context.Context, in *GetClusterOperatorHealthRequest, opts ...grpc.CallOption) (*GetClusterOperatorHealthResponse, error) +} + +type operatorHealthServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewOperatorHealthServiceClient(cc grpc.ClientConnInterface) OperatorHealthServiceClient { + return &operatorHealthServiceClient{cc} +} + +func (c *operatorHealthServiceClient) ReportHealth(ctx context.Context, in *ReportHealthRequest, opts ...grpc.CallOption) (*ReportHealthResponse, error) { + out := new(ReportHealthResponse) + err := c.cc.Invoke(ctx, OperatorHealthService_ReportHealth_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operatorHealthServiceClient) GetClusterOperatorHealth(ctx context.Context, in *GetClusterOperatorHealthRequest, opts ...grpc.CallOption) (*GetClusterOperatorHealthResponse, error) { + out := new(GetClusterOperatorHealthResponse) + err := c.cc.Invoke(ctx, OperatorHealthService_GetClusterOperatorHealth_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OperatorHealthServiceServer is the server API for OperatorHealthService service. +// All implementations must embed UnimplementedOperatorHealthServiceServer +// for forward compatibility +type OperatorHealthServiceServer interface { + ReportHealth(context.Context, *ReportHealthRequest) (*ReportHealthResponse, error) + GetClusterOperatorHealth(context.Context, *GetClusterOperatorHealthRequest) (*GetClusterOperatorHealthResponse, error) + mustEmbedUnimplementedOperatorHealthServiceServer() +} + +// UnimplementedOperatorHealthServiceServer must be embedded to have forward compatible implementations. +type UnimplementedOperatorHealthServiceServer struct { +} + +func (UnimplementedOperatorHealthServiceServer) ReportHealth(context.Context, *ReportHealthRequest) (*ReportHealthResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReportHealth not implemented") +} +func (UnimplementedOperatorHealthServiceServer) GetClusterOperatorHealth(context.Context, *GetClusterOperatorHealthRequest) (*GetClusterOperatorHealthResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetClusterOperatorHealth not implemented") +} +func (UnimplementedOperatorHealthServiceServer) mustEmbedUnimplementedOperatorHealthServiceServer() {} + +// UnsafeOperatorHealthServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OperatorHealthServiceServer will +// result in compilation errors. +type UnsafeOperatorHealthServiceServer interface { + mustEmbedUnimplementedOperatorHealthServiceServer() +} + +func RegisterOperatorHealthServiceServer(s grpc.ServiceRegistrar, srv OperatorHealthServiceServer) { + s.RegisterService(&OperatorHealthService_ServiceDesc, srv) +} + +func _OperatorHealthService_ReportHealth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportHealthRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperatorHealthServiceServer).ReportHealth(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperatorHealthService_ReportHealth_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperatorHealthServiceServer).ReportHealth(ctx, req.(*ReportHealthRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OperatorHealthService_GetClusterOperatorHealth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterOperatorHealthRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperatorHealthServiceServer).GetClusterOperatorHealth(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperatorHealthService_GetClusterOperatorHealth_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperatorHealthServiceServer).GetClusterOperatorHealth(ctx, req.(*GetClusterOperatorHealthRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OperatorHealthService_ServiceDesc is the grpc.ServiceDesc for OperatorHealthService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OperatorHealthService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.OperatorHealthService", + HandlerType: (*OperatorHealthServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReportHealth", + Handler: _OperatorHealthService_ReportHealth_Handler, + }, + { + MethodName: "GetClusterOperatorHealth", + Handler: _OperatorHealthService_GetClusterOperatorHealth_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api/v1/operator_health.proto", +} diff --git a/internal/controller/custom.go b/internal/controller/custom.go index a41be386..229a4a44 100644 --- a/internal/controller/custom.go +++ b/internal/controller/custom.go @@ -58,6 +58,7 @@ type EnvBasedController struct { stopCh chan struct{} reconcileInterval time.Duration mpaServerPort int + startTime time.Time } // NewEnvBasedController creates a new environment-based controller @@ -150,6 +151,8 @@ func NewEnvBasedController(mgr ctrl.Manager, reconcileInterval time.Duration, mp // Start implements the Runnable interface for manager.Add func (c *EnvBasedController) Start(ctx context.Context) error { + c.startTime = time.Now() + // Log version information at startup versionInfo := version.Get() @@ -193,25 +196,55 @@ func (c *EnvBasedController) Start(ctx context.Context) error { return nil } -// runHealthReporting periodically logs the health status of all registered components. +// runHealthReporting periodically logs the health status of all registered components +// and sends a heartbeat to dakr via the ReportHealth RPC. func (c *EnvBasedController) runHealthReporting(ctx context.Context) { - ticker := time.NewTicker(60 * time.Second) // Report health status every 60 seconds + ticker := time.NewTicker(60 * time.Second) defer ticker.Stop() + // Send initial heartbeat immediately so dakr sees the operator right away + c.sendHealthReport(ctx) + for { select { case <-ticker.C: - report := c.Reconciler.HealthManager.BuildReport() - for name, status := range report { - c.Log.Info("Health status report", "component", name, "status", status.Status, "message", status.Message, "metadata", status.Metadata) - } + c.sendHealthReport(ctx) case <-c.stopCh: return case <-ctx.Done(): return } + } +} + +// sendHealthReport logs component health and sends a heartbeat to dakr. +// It builds the report once to keep local logs and the RPC payload consistent. +func (c *EnvBasedController) sendHealthReport(ctx context.Context) { + report := c.Reconciler.HealthManager.BuildReport() + for name, status := range report { + c.Log.Info("Health status report", "component", name, "status", status.Status, "message", status.Message, "metadata", status.Metadata) + } + + if c.Reconciler.DakrClient != nil { + versionInfo := version.Get() + req := health.BuildHeartbeatRequestFromReport( + report, + c.getClusterID(), + versionInfo.String(), + c.startTime, + ) + if err := c.Reconciler.DakrClient.ReportHealth(ctx, req); err != nil { + c.Log.Error(err, "Failed to send health heartbeat to dakr") + } + } +} +// getClusterID returns the cluster ID from environment configuration. +func (c *EnvBasedController) getClusterID() string { + if id := os.Getenv("CLUSTER_ID"); id != "" { + return id } + return "unknown" } // NeedLeaderElection implements the LeaderElectionRunnable interface diff --git a/internal/health/heartbeat.go b/internal/health/heartbeat.go new file mode 100644 index 00000000..116d8d99 --- /dev/null +++ b/internal/health/heartbeat.go @@ -0,0 +1,67 @@ +package health + +import ( + "time" + + gen "github.com/devzero-inc/zxporter/gen/api/v1" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// toProtoHealthStatus maps internal HealthStatus to proto HealthStatus. +func toProtoHealthStatus(s HealthStatus) gen.HealthStatus { + switch s { + case HealthStatusHealthy: + return gen.HealthStatus_HEALTH_STATUS_HEALTHY + case HealthStatusDegraded: + return gen.HealthStatus_HEALTH_STATUS_DEGRADED + case HealthStatusUnhealthy: + return gen.HealthStatus_HEALTH_STATUS_UNHEALTHY + default: + return gen.HealthStatus_HEALTH_STATUS_UNSPECIFIED + } +} + +// worstStatus returns the more severe of two HealthStatus values. +// NOTE: This relies on proto enum values being ordered by increasing severity: +// UNSPECIFIED(0) < HEALTHY(1) < DEGRADED(2) < UNHEALTHY(3). +func worstStatus(a, b gen.HealthStatus) gen.HealthStatus { + if a > b { + return a + } + return b +} + +// BuildHeartbeatRequest constructs a ReportHealthRequest from the current +// HealthManager state. The zxporter operator type is OPERATOR_TYPE_READ. +func BuildHeartbeatRequest(hm *HealthManager, clusterID, version string, startTime time.Time) *gen.ReportHealthRequest { + return BuildHeartbeatRequestFromReport(hm.BuildReport(), clusterID, version, startTime) +} + +// BuildHeartbeatRequestFromReport constructs a ReportHealthRequest from an +// already-built report map. Use this when you need to log and send the same +// snapshot to avoid a double lock acquisition on HealthManager. +func BuildHeartbeatRequestFromReport(report map[string]ComponentStatus, clusterID, version string, startTime time.Time) *gen.ReportHealthRequest { + overall := gen.HealthStatus_HEALTH_STATUS_UNSPECIFIED + components := make([]*gen.ComponentHealth, 0, len(report)) + + for name, cs := range report { + protoStatus := toProtoHealthStatus(cs.Status) + overall = worstStatus(overall, protoStatus) + + components = append(components, &gen.ComponentHealth{ + Name: name, + Status: protoStatus, + Message: cs.Message, + Metadata: cs.Metadata, + }) + } + + return &gen.ReportHealthRequest{ + ClusterId: clusterID, + OperatorType: gen.OperatorType_OPERATOR_TYPE_READ, + Version: version, + OverallStatus: overall, + Components: components, + UptimeSince: timestamppb.New(startTime), + } +} diff --git a/internal/health/heartbeat_test.go b/internal/health/heartbeat_test.go new file mode 100644 index 00000000..a10fd4df --- /dev/null +++ b/internal/health/heartbeat_test.go @@ -0,0 +1,80 @@ +package health + +import ( + "testing" + "time" + + gen "github.com/devzero-inc/zxporter/gen/api/v1" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestBuildHeartbeatRequest(t *testing.T) { + hm := NewHealthManager() + hm.Register(ComponentCollectorManager) + hm.Register(ComponentDakrTransport) + hm.UpdateStatus(ComponentCollectorManager, HealthStatusHealthy, "all good", map[string]string{"active": "5"}) + hm.UpdateStatus(ComponentDakrTransport, HealthStatusDegraded, "retrying", nil) + + startTime := time.Now().Add(-10 * time.Minute) + + req := BuildHeartbeatRequest(hm, "cluster-123", "1.2.3", startTime) + + assert.Equal(t, "cluster-123", req.ClusterId) + assert.Equal(t, "1.2.3", req.Version) + assert.Equal(t, gen.OperatorType_OPERATOR_TYPE_READ, req.OperatorType) + require.NotNil(t, req.UptimeSince) + assert.Equal(t, startTime.Unix(), req.UptimeSince.AsTime().Unix()) + + // Overall status should be the worst across components + assert.Equal(t, gen.HealthStatus_HEALTH_STATUS_DEGRADED, req.OverallStatus) + + // Components should be present + assert.Len(t, req.Components, 2) +} + +func TestBuildHeartbeatRequest_OverallStatus(t *testing.T) { + tests := []struct { + name string + statuses []HealthStatus + expected gen.HealthStatus + }{ + { + name: "all healthy", + statuses: []HealthStatus{HealthStatusHealthy, HealthStatusHealthy}, + expected: gen.HealthStatus_HEALTH_STATUS_HEALTHY, + }, + { + name: "one degraded", + statuses: []HealthStatus{HealthStatusHealthy, HealthStatusDegraded}, + expected: gen.HealthStatus_HEALTH_STATUS_DEGRADED, + }, + { + name: "one unhealthy", + statuses: []HealthStatus{HealthStatusHealthy, HealthStatusUnhealthy}, + expected: gen.HealthStatus_HEALTH_STATUS_UNHEALTHY, + }, + { + name: "all unspecified", + statuses: []HealthStatus{HealthStatusUnspecified}, + expected: gen.HealthStatus_HEALTH_STATUS_UNSPECIFIED, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + hm := NewHealthManager() + for i, s := range tt.statuses { + name := ComponentCollectorManager + if i > 0 { + name = ComponentDakrTransport + } + hm.Register(name) + hm.UpdateStatus(name, s, "", nil) + } + + req := BuildHeartbeatRequest(hm, "c1", "1.0.0", time.Now()) + assert.Equal(t, tt.expected, req.OverallStatus) + }) + } +} diff --git a/internal/transport/dakr_client.go b/internal/transport/dakr_client.go index fd0e4c25..1d2bae42 100644 --- a/internal/transport/dakr_client.go +++ b/internal/transport/dakr_client.go @@ -118,10 +118,11 @@ func (h *ClientHeaders) AttachToRequest(header http.Header) { // RealDakrClient implements communication with Dakr service type RealDakrClient struct { - logger logr.Logger - client genconnect.MetricsCollectorServiceClient - clusterClient genconnect.ClusterServiceClient - clientHeaders *ClientHeaders + logger logr.Logger + client genconnect.MetricsCollectorServiceClient + clusterClient genconnect.ClusterServiceClient + clientHeaders *ClientHeaders + operatorHealthClient genconnect.OperatorHealthServiceClient } // NewDakrClient creates a new client for Dakr service @@ -238,11 +239,18 @@ func NewDakrClient(dakrBaseURL string, clusterToken string, logger logr.Logger) clientOptions..., ) + operatorHealthClient := genconnect.NewOperatorHealthServiceClient( + httpClient, + dakrBaseURL, + clientOptions..., + ) + return &RealDakrClient{ - logger: logger.WithName("dakr-client"), - client: client, - clusterClient: clusterClient, - clientHeaders: clientHeaders, + logger: logger.WithName("dakr-client"), + client: client, + clusterClient: clusterClient, + clientHeaders: clientHeaders, + operatorHealthClient: operatorHealthClient, } } @@ -658,3 +666,9 @@ func (c *RealDakrClient) SendNetworkTrafficMetrics(ctx context.Context, req *gen return resp.Msg, nil } + +// ReportHealth reports the health status of the operator to Dakr +func (c *RealDakrClient) ReportHealth(ctx context.Context, req *gen.ReportHealthRequest) error { + _, err := c.operatorHealthClient.ReportHealth(ctx, connect.NewRequest(req)) + return err +} diff --git a/internal/transport/interface.go b/internal/transport/interface.go index fda72f61..b8fb18b3 100644 --- a/internal/transport/interface.go +++ b/internal/transport/interface.go @@ -28,6 +28,9 @@ type DakrClient interface { // SendNetworkTrafficMetrics pushes network traffic metrics from a node SendNetworkTrafficMetrics(ctx context.Context, req *gen.SendNetworkTrafficMetricsRequest) (*gen.SendNetworkTrafficMetricsResponse, error) + + // ReportHealth + ReportHealth(ctx context.Context, req *gen.ReportHealthRequest) error } // Sender defines methods for sending data to external systems diff --git a/internal/transport/sender.go b/internal/transport/sender.go index 0293b8de..e1c5ea15 100644 --- a/internal/transport/sender.go +++ b/internal/transport/sender.go @@ -186,3 +186,9 @@ func (c *SimpleDakrClient) SendNetworkTrafficMetrics(ctx context.Context, req *g "lookupsCount", len(req.DnsLookups)) return &gen.SendNetworkTrafficMetricsResponse{ProcessedCount: int32(len(req.Items))}, nil } + +// ReportHealth implements SimpleDakrClient. +func (c *SimpleDakrClient) ReportHealth(ctx context.Context, req *gen.ReportHealthRequest) error { + c.logger.Info("ReportHealth (simple client, no-op)", "cluster_id", req.ClusterId, "version", req.Version) + return nil +} diff --git a/proto/dakr_proto_descriptor.bin b/proto/dakr_proto_descriptor.bin index 8b41dbfb..52b52e2e 100644 Binary files a/proto/dakr_proto_descriptor.bin and b/proto/dakr_proto_descriptor.bin differ