diff --git a/dataproxy/service/cluster_service.go b/dataproxy/service/cluster_service.go new file mode 100644 index 0000000000..d0d9ddf078 --- /dev/null +++ b/dataproxy/service/cluster_service.go @@ -0,0 +1,32 @@ +package service + +import ( + "context" + + "connectrpc.com/connect" + + "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster" + "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster/clusterconnect" +) + +type ClusterService struct { + clusterconnect.UnimplementedClusterServiceHandler + dataplaneDomain string +} + +func NewClusterService(dataplaneDomain string) *ClusterService { + return &ClusterService{ + dataplaneDomain: dataplaneDomain, + } +} + +var _ clusterconnect.ClusterServiceHandler = (*ClusterService)(nil) + +func (s *ClusterService) SelectCluster( + ctx context.Context, + req *connect.Request[cluster.SelectClusterRequest], +) (*connect.Response[cluster.SelectClusterResponse], error) { + return connect.NewResponse(&cluster.SelectClusterResponse{ + ClusterEndpoint: s.dataplaneDomain, + }), nil +} diff --git a/dataproxy/setup.go b/dataproxy/setup.go index 43697514ad..cc44acaede 100644 --- a/dataproxy/setup.go +++ b/dataproxy/setup.go @@ -8,6 +8,7 @@ import ( "github.com/flyteorg/flyte/v2/flytestdlib/app" "github.com/flyteorg/flyte/v2/dataproxy/config" "github.com/flyteorg/flyte/v2/dataproxy/service" + "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster/clusterconnect" "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/dataproxy/dataproxyconnect" "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/task/taskconnect" "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/trigger/triggerconnect" @@ -32,6 +33,11 @@ func Setup(ctx context.Context, sc *app.SetupContext) error { sc.Mux.Handle(path, handler) logger.Infof(ctx, "Mounted DataProxyService at %s", path) + clusterSvc := service.NewClusterService(baseURL) + clusterPath, clusterHandler := clusterconnect.NewClusterServiceHandler(clusterSvc) + sc.Mux.Handle(clusterPath, clusterHandler) + logger.Infof(ctx, "Mounted ClusterService at %s", clusterPath) + sc.AddReadyCheck(func(r *http.Request) error { baseContainer := sc.DataStore.GetBaseContainerFQN(r.Context()) if baseContainer == "" { diff --git a/flyteidl2/cluster/payload.proto b/flyteidl2/cluster/payload.proto new file mode 100644 index 0000000000..fa996cab24 --- /dev/null +++ b/flyteidl2/cluster/payload.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package flyteidl2.cluster; + +import "buf/validate/validate.proto"; +import "flyteidl2/app/app_definition.proto"; +import "flyteidl2/common/identifier.proto"; +import "flyteidl2/task/task_definition.proto"; + +option go_package = "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster"; + +message SelectClusterRequest { + oneof resource { + option (buf.validate.oneof).required = true; + flyteidl2.common.OrgIdentifier org_id = 1; + flyteidl2.common.ProjectIdentifier project_id = 2; + flyteidl2.task.TaskIdentifier task_id = 3; + flyteidl2.common.ActionIdentifier action_id = 4; + flyteidl2.common.ActionAttemptIdentifier action_attempt_id = 5; + flyteidl2.app.Identifier app_id = 6; + } + + enum Operation { + OPERATION_UNSPECIFIED = 0; + OPERATION_CREATE_UPLOAD_LOCATION = 1; + OPERATION_UPLOAD_INPUTS = 2; + OPERATION_GET_ACTION_DATA = 3; + OPERATION_QUERY_RANGE_METRICS = 4; + OPERATION_CREATE_DOWNLOAD_LINK = 5; + OPERATION_TAIL_LOGS = 6; + OPERATION_GET_ACTION_ATTEMPT_METRICS = 7; + } + + Operation operation = 8 [(buf.validate.field).enum = { + not_in: [0] + }]; +} + +message SelectClusterResponse { + string cluster_endpoint = 1; +} diff --git a/flyteidl2/cluster/service.proto b/flyteidl2/cluster/service.proto new file mode 100644 index 0000000000..2bbdd418b5 --- /dev/null +++ b/flyteidl2/cluster/service.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package flyteidl2.cluster; + +import "flyteidl2/cluster/payload.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster"; + +service ClusterService { + rpc SelectCluster(SelectClusterRequest) returns (SelectClusterResponse) {} +} diff --git a/gen/go/flyteidl2/cluster/clusterconnect/service.connect.go b/gen/go/flyteidl2/cluster/clusterconnect/service.connect.go new file mode 100644 index 0000000000..17682a8c99 --- /dev/null +++ b/gen/go/flyteidl2/cluster/clusterconnect/service.connect.go @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: flyteidl2/cluster/service.proto + +package clusterconnect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + cluster "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster" + 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.IsAtLeastVersion1_13_0 + +const ( + // ClusterServiceName is the fully-qualified name of the ClusterService service. + ClusterServiceName = "flyteidl2.cluster.ClusterService" +) + +// 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 ( + // ClusterServiceSelectClusterProcedure is the fully-qualified name of the ClusterService's + // SelectCluster RPC. + ClusterServiceSelectClusterProcedure = "/flyteidl2.cluster.ClusterService/SelectCluster" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + clusterServiceServiceDescriptor = cluster.File_flyteidl2_cluster_service_proto.Services().ByName("ClusterService") + clusterServiceSelectClusterMethodDescriptor = clusterServiceServiceDescriptor.Methods().ByName("SelectCluster") +) + +// ClusterServiceClient is a client for the flyteidl2.cluster.ClusterService service. +type ClusterServiceClient interface { + SelectCluster(context.Context, *connect.Request[cluster.SelectClusterRequest]) (*connect.Response[cluster.SelectClusterResponse], error) +} + +// NewClusterServiceClient constructs a client for the flyteidl2.cluster.ClusterService 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 NewClusterServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ClusterServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &clusterServiceClient{ + selectCluster: connect.NewClient[cluster.SelectClusterRequest, cluster.SelectClusterResponse]( + httpClient, + baseURL+ClusterServiceSelectClusterProcedure, + connect.WithSchema(clusterServiceSelectClusterMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// clusterServiceClient implements ClusterServiceClient. +type clusterServiceClient struct { + selectCluster *connect.Client[cluster.SelectClusterRequest, cluster.SelectClusterResponse] +} + +// SelectCluster calls flyteidl2.cluster.ClusterService.SelectCluster. +func (c *clusterServiceClient) SelectCluster(ctx context.Context, req *connect.Request[cluster.SelectClusterRequest]) (*connect.Response[cluster.SelectClusterResponse], error) { + return c.selectCluster.CallUnary(ctx, req) +} + +// ClusterServiceHandler is an implementation of the flyteidl2.cluster.ClusterService service. +type ClusterServiceHandler interface { + SelectCluster(context.Context, *connect.Request[cluster.SelectClusterRequest]) (*connect.Response[cluster.SelectClusterResponse], error) +} + +// NewClusterServiceHandler 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 NewClusterServiceHandler(svc ClusterServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + clusterServiceSelectClusterHandler := connect.NewUnaryHandler( + ClusterServiceSelectClusterProcedure, + svc.SelectCluster, + connect.WithSchema(clusterServiceSelectClusterMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/flyteidl2.cluster.ClusterService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case ClusterServiceSelectClusterProcedure: + clusterServiceSelectClusterHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedClusterServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedClusterServiceHandler struct{} + +func (UnimplementedClusterServiceHandler) SelectCluster(context.Context, *connect.Request[cluster.SelectClusterRequest]) (*connect.Response[cluster.SelectClusterResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("flyteidl2.cluster.ClusterService.SelectCluster is not implemented")) +} diff --git a/gen/go/flyteidl2/cluster/payload.pb.go b/gen/go/flyteidl2/cluster/payload.pb.go new file mode 100644 index 0000000000..213435434a --- /dev/null +++ b/gen/go/flyteidl2/cluster/payload.pb.go @@ -0,0 +1,466 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: flyteidl2/cluster/payload.proto + +package cluster + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + app "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/app" + common "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/common" + task "github.com/flyteorg/flyte/v2/gen/go/flyteidl2/task" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + 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 SelectClusterRequest_Operation int32 + +const ( + SelectClusterRequest_OPERATION_UNSPECIFIED SelectClusterRequest_Operation = 0 + SelectClusterRequest_OPERATION_CREATE_UPLOAD_LOCATION SelectClusterRequest_Operation = 1 + SelectClusterRequest_OPERATION_UPLOAD_INPUTS SelectClusterRequest_Operation = 2 + SelectClusterRequest_OPERATION_GET_ACTION_DATA SelectClusterRequest_Operation = 3 + SelectClusterRequest_OPERATION_QUERY_RANGE_METRICS SelectClusterRequest_Operation = 4 + SelectClusterRequest_OPERATION_CREATE_DOWNLOAD_LINK SelectClusterRequest_Operation = 5 + SelectClusterRequest_OPERATION_TAIL_LOGS SelectClusterRequest_Operation = 6 + SelectClusterRequest_OPERATION_GET_ACTION_ATTEMPT_METRICS SelectClusterRequest_Operation = 7 +) + +// Enum value maps for SelectClusterRequest_Operation. +var ( + SelectClusterRequest_Operation_name = map[int32]string{ + 0: "OPERATION_UNSPECIFIED", + 1: "OPERATION_CREATE_UPLOAD_LOCATION", + 2: "OPERATION_UPLOAD_INPUTS", + 3: "OPERATION_GET_ACTION_DATA", + 4: "OPERATION_QUERY_RANGE_METRICS", + 5: "OPERATION_CREATE_DOWNLOAD_LINK", + 6: "OPERATION_TAIL_LOGS", + 7: "OPERATION_GET_ACTION_ATTEMPT_METRICS", + } + SelectClusterRequest_Operation_value = map[string]int32{ + "OPERATION_UNSPECIFIED": 0, + "OPERATION_CREATE_UPLOAD_LOCATION": 1, + "OPERATION_UPLOAD_INPUTS": 2, + "OPERATION_GET_ACTION_DATA": 3, + "OPERATION_QUERY_RANGE_METRICS": 4, + "OPERATION_CREATE_DOWNLOAD_LINK": 5, + "OPERATION_TAIL_LOGS": 6, + "OPERATION_GET_ACTION_ATTEMPT_METRICS": 7, + } +) + +func (x SelectClusterRequest_Operation) Enum() *SelectClusterRequest_Operation { + p := new(SelectClusterRequest_Operation) + *p = x + return p +} + +func (x SelectClusterRequest_Operation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SelectClusterRequest_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_flyteidl2_cluster_payload_proto_enumTypes[0].Descriptor() +} + +func (SelectClusterRequest_Operation) Type() protoreflect.EnumType { + return &file_flyteidl2_cluster_payload_proto_enumTypes[0] +} + +func (x SelectClusterRequest_Operation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SelectClusterRequest_Operation.Descriptor instead. +func (SelectClusterRequest_Operation) EnumDescriptor() ([]byte, []int) { + return file_flyteidl2_cluster_payload_proto_rawDescGZIP(), []int{0, 0} +} + +type SelectClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Resource: + // + // *SelectClusterRequest_OrgId + // *SelectClusterRequest_ProjectId + // *SelectClusterRequest_TaskId + // *SelectClusterRequest_ActionId + // *SelectClusterRequest_ActionAttemptId + // *SelectClusterRequest_AppId + Resource isSelectClusterRequest_Resource `protobuf_oneof:"resource"` + Operation SelectClusterRequest_Operation `protobuf:"varint,8,opt,name=operation,proto3,enum=flyteidl2.cluster.SelectClusterRequest_Operation" json:"operation,omitempty"` +} + +func (x *SelectClusterRequest) Reset() { + *x = SelectClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl2_cluster_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelectClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelectClusterRequest) ProtoMessage() {} + +func (x *SelectClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl2_cluster_payload_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 SelectClusterRequest.ProtoReflect.Descriptor instead. +func (*SelectClusterRequest) Descriptor() ([]byte, []int) { + return file_flyteidl2_cluster_payload_proto_rawDescGZIP(), []int{0} +} + +func (m *SelectClusterRequest) GetResource() isSelectClusterRequest_Resource { + if m != nil { + return m.Resource + } + return nil +} + +func (x *SelectClusterRequest) GetOrgId() *common.OrgIdentifier { + if x, ok := x.GetResource().(*SelectClusterRequest_OrgId); ok { + return x.OrgId + } + return nil +} + +func (x *SelectClusterRequest) GetProjectId() *common.ProjectIdentifier { + if x, ok := x.GetResource().(*SelectClusterRequest_ProjectId); ok { + return x.ProjectId + } + return nil +} + +func (x *SelectClusterRequest) GetTaskId() *task.TaskIdentifier { + if x, ok := x.GetResource().(*SelectClusterRequest_TaskId); ok { + return x.TaskId + } + return nil +} + +func (x *SelectClusterRequest) GetActionId() *common.ActionIdentifier { + if x, ok := x.GetResource().(*SelectClusterRequest_ActionId); ok { + return x.ActionId + } + return nil +} + +func (x *SelectClusterRequest) GetActionAttemptId() *common.ActionAttemptIdentifier { + if x, ok := x.GetResource().(*SelectClusterRequest_ActionAttemptId); ok { + return x.ActionAttemptId + } + return nil +} + +func (x *SelectClusterRequest) GetAppId() *app.Identifier { + if x, ok := x.GetResource().(*SelectClusterRequest_AppId); ok { + return x.AppId + } + return nil +} + +func (x *SelectClusterRequest) GetOperation() SelectClusterRequest_Operation { + if x != nil { + return x.Operation + } + return SelectClusterRequest_OPERATION_UNSPECIFIED +} + +type isSelectClusterRequest_Resource interface { + isSelectClusterRequest_Resource() +} + +type SelectClusterRequest_OrgId struct { + OrgId *common.OrgIdentifier `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3,oneof"` +} + +type SelectClusterRequest_ProjectId struct { + ProjectId *common.ProjectIdentifier `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3,oneof"` +} + +type SelectClusterRequest_TaskId struct { + TaskId *task.TaskIdentifier `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3,oneof"` +} + +type SelectClusterRequest_ActionId struct { + ActionId *common.ActionIdentifier `protobuf:"bytes,4,opt,name=action_id,json=actionId,proto3,oneof"` +} + +type SelectClusterRequest_ActionAttemptId struct { + ActionAttemptId *common.ActionAttemptIdentifier `protobuf:"bytes,5,opt,name=action_attempt_id,json=actionAttemptId,proto3,oneof"` +} + +type SelectClusterRequest_AppId struct { + AppId *app.Identifier `protobuf:"bytes,6,opt,name=app_id,json=appId,proto3,oneof"` +} + +func (*SelectClusterRequest_OrgId) isSelectClusterRequest_Resource() {} + +func (*SelectClusterRequest_ProjectId) isSelectClusterRequest_Resource() {} + +func (*SelectClusterRequest_TaskId) isSelectClusterRequest_Resource() {} + +func (*SelectClusterRequest_ActionId) isSelectClusterRequest_Resource() {} + +func (*SelectClusterRequest_ActionAttemptId) isSelectClusterRequest_Resource() {} + +func (*SelectClusterRequest_AppId) isSelectClusterRequest_Resource() {} + +type SelectClusterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterEndpoint string `protobuf:"bytes,1,opt,name=cluster_endpoint,json=clusterEndpoint,proto3" json:"cluster_endpoint,omitempty"` +} + +func (x *SelectClusterResponse) Reset() { + *x = SelectClusterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl2_cluster_payload_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelectClusterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelectClusterResponse) ProtoMessage() {} + +func (x *SelectClusterResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl2_cluster_payload_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 SelectClusterResponse.ProtoReflect.Descriptor instead. +func (*SelectClusterResponse) Descriptor() ([]byte, []int) { + return file_flyteidl2_cluster_payload_proto_rawDescGZIP(), []int{1} +} + +func (x *SelectClusterResponse) GetClusterEndpoint() string { + if x != nil { + return x.ClusterEndpoint + } + return "" +} + +var File_flyteidl2_cluster_payload_proto protoreflect.FileDescriptor + +var file_flyteidl2_cluster_payload_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x11, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x22, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x61, 0x70, 0x70, + 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x32, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, + 0x06, 0x0a, 0x14, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, + 0x64, 0x12, 0x44, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, + 0x49, 0x64, 0x12, 0x41, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x49, 0x64, 0x12, 0x32, + 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x61, 0x70, 0x70, + 0x49, 0x64, 0x12, 0x59, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, + 0x20, 0x00, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x92, 0x02, + 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, + 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, + 0x44, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, + 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, + 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x53, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x50, 0x45, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x4f, 0x50, 0x45, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x52, 0x41, 0x4e, 0x47, + 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x53, 0x10, 0x04, 0x12, 0x22, 0x0a, 0x1e, 0x4f, + 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, + 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x05, 0x12, + 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x41, 0x49, + 0x4c, 0x5f, 0x4c, 0x4f, 0x47, 0x53, 0x10, 0x06, 0x12, 0x28, 0x0a, 0x24, 0x4f, 0x50, 0x45, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x41, 0x54, 0x54, 0x45, 0x4d, 0x50, 0x54, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x53, + 0x10, 0x07, 0x42, 0x11, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x05, + 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x42, 0x0a, 0x15, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0xc3, 0x01, 0x0a, 0x15, 0x63, 0x6f, + 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x42, 0x0c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x48, 0x02, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xa2, 0x02, 0x03, 0x46, + 0x43, 0x58, 0xaa, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xca, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x32, 0x5c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xe2, 0x02, 0x1d, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x5c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_flyteidl2_cluster_payload_proto_rawDescOnce sync.Once + file_flyteidl2_cluster_payload_proto_rawDescData = file_flyteidl2_cluster_payload_proto_rawDesc +) + +func file_flyteidl2_cluster_payload_proto_rawDescGZIP() []byte { + file_flyteidl2_cluster_payload_proto_rawDescOnce.Do(func() { + file_flyteidl2_cluster_payload_proto_rawDescData = protoimpl.X.CompressGZIP(file_flyteidl2_cluster_payload_proto_rawDescData) + }) + return file_flyteidl2_cluster_payload_proto_rawDescData +} + +var file_flyteidl2_cluster_payload_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_flyteidl2_cluster_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_flyteidl2_cluster_payload_proto_goTypes = []interface{}{ + (SelectClusterRequest_Operation)(0), // 0: flyteidl2.cluster.SelectClusterRequest.Operation + (*SelectClusterRequest)(nil), // 1: flyteidl2.cluster.SelectClusterRequest + (*SelectClusterResponse)(nil), // 2: flyteidl2.cluster.SelectClusterResponse + (*common.OrgIdentifier)(nil), // 3: flyteidl2.common.OrgIdentifier + (*common.ProjectIdentifier)(nil), // 4: flyteidl2.common.ProjectIdentifier + (*task.TaskIdentifier)(nil), // 5: flyteidl2.task.TaskIdentifier + (*common.ActionIdentifier)(nil), // 6: flyteidl2.common.ActionIdentifier + (*common.ActionAttemptIdentifier)(nil), // 7: flyteidl2.common.ActionAttemptIdentifier + (*app.Identifier)(nil), // 8: flyteidl2.app.Identifier +} +var file_flyteidl2_cluster_payload_proto_depIdxs = []int32{ + 3, // 0: flyteidl2.cluster.SelectClusterRequest.org_id:type_name -> flyteidl2.common.OrgIdentifier + 4, // 1: flyteidl2.cluster.SelectClusterRequest.project_id:type_name -> flyteidl2.common.ProjectIdentifier + 5, // 2: flyteidl2.cluster.SelectClusterRequest.task_id:type_name -> flyteidl2.task.TaskIdentifier + 6, // 3: flyteidl2.cluster.SelectClusterRequest.action_id:type_name -> flyteidl2.common.ActionIdentifier + 7, // 4: flyteidl2.cluster.SelectClusterRequest.action_attempt_id:type_name -> flyteidl2.common.ActionAttemptIdentifier + 8, // 5: flyteidl2.cluster.SelectClusterRequest.app_id:type_name -> flyteidl2.app.Identifier + 0, // 6: flyteidl2.cluster.SelectClusterRequest.operation:type_name -> flyteidl2.cluster.SelectClusterRequest.Operation + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_flyteidl2_cluster_payload_proto_init() } +func file_flyteidl2_cluster_payload_proto_init() { + if File_flyteidl2_cluster_payload_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_flyteidl2_cluster_payload_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelectClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl2_cluster_payload_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelectClusterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_flyteidl2_cluster_payload_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*SelectClusterRequest_OrgId)(nil), + (*SelectClusterRequest_ProjectId)(nil), + (*SelectClusterRequest_TaskId)(nil), + (*SelectClusterRequest_ActionId)(nil), + (*SelectClusterRequest_ActionAttemptId)(nil), + (*SelectClusterRequest_AppId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_flyteidl2_cluster_payload_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_flyteidl2_cluster_payload_proto_goTypes, + DependencyIndexes: file_flyteidl2_cluster_payload_proto_depIdxs, + EnumInfos: file_flyteidl2_cluster_payload_proto_enumTypes, + MessageInfos: file_flyteidl2_cluster_payload_proto_msgTypes, + }.Build() + File_flyteidl2_cluster_payload_proto = out.File + file_flyteidl2_cluster_payload_proto_rawDesc = nil + file_flyteidl2_cluster_payload_proto_goTypes = nil + file_flyteidl2_cluster_payload_proto_depIdxs = nil +} diff --git a/gen/go/flyteidl2/cluster/payload.pb.validate.go b/gen/go/flyteidl2/cluster/payload.pb.validate.go new file mode 100644 index 0000000000..b48d05e6c5 --- /dev/null +++ b/gen/go/flyteidl2/cluster/payload.pb.validate.go @@ -0,0 +1,495 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: flyteidl2/cluster/payload.proto + +package cluster + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SelectClusterRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SelectClusterRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SelectClusterRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SelectClusterRequestMultiError, or nil if none found. +func (m *SelectClusterRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *SelectClusterRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Operation + + switch v := m.Resource.(type) { + case *SelectClusterRequest_OrgId: + if v == nil { + err := SelectClusterRequestValidationError{ + field: "Resource", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOrgId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "OrgId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "OrgId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrgId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SelectClusterRequestValidationError{ + field: "OrgId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *SelectClusterRequest_ProjectId: + if v == nil { + err := SelectClusterRequestValidationError{ + field: "Resource", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetProjectId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "ProjectId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "ProjectId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProjectId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SelectClusterRequestValidationError{ + field: "ProjectId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *SelectClusterRequest_TaskId: + if v == nil { + err := SelectClusterRequestValidationError{ + field: "Resource", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTaskId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "TaskId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "TaskId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTaskId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SelectClusterRequestValidationError{ + field: "TaskId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *SelectClusterRequest_ActionId: + if v == nil { + err := SelectClusterRequestValidationError{ + field: "Resource", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetActionId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "ActionId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "ActionId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActionId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SelectClusterRequestValidationError{ + field: "ActionId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *SelectClusterRequest_ActionAttemptId: + if v == nil { + err := SelectClusterRequestValidationError{ + field: "Resource", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetActionAttemptId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "ActionAttemptId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "ActionAttemptId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActionAttemptId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SelectClusterRequestValidationError{ + field: "ActionAttemptId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *SelectClusterRequest_AppId: + if v == nil { + err := SelectClusterRequestValidationError{ + field: "Resource", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetAppId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "AppId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SelectClusterRequestValidationError{ + field: "AppId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAppId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SelectClusterRequestValidationError{ + field: "AppId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return SelectClusterRequestMultiError(errors) + } + + return nil +} + +// SelectClusterRequestMultiError is an error wrapping multiple validation +// errors returned by SelectClusterRequest.ValidateAll() if the designated +// constraints aren't met. +type SelectClusterRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SelectClusterRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SelectClusterRequestMultiError) AllErrors() []error { return m } + +// SelectClusterRequestValidationError is the validation error returned by +// SelectClusterRequest.Validate if the designated constraints aren't met. +type SelectClusterRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SelectClusterRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SelectClusterRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SelectClusterRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SelectClusterRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SelectClusterRequestValidationError) ErrorName() string { + return "SelectClusterRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e SelectClusterRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSelectClusterRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SelectClusterRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SelectClusterRequestValidationError{} + +// Validate checks the field values on SelectClusterResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SelectClusterResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SelectClusterResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SelectClusterResponseMultiError, or nil if none found. +func (m *SelectClusterResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *SelectClusterResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ClusterEndpoint + + if len(errors) > 0 { + return SelectClusterResponseMultiError(errors) + } + + return nil +} + +// SelectClusterResponseMultiError is an error wrapping multiple validation +// errors returned by SelectClusterResponse.ValidateAll() if the designated +// constraints aren't met. +type SelectClusterResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SelectClusterResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SelectClusterResponseMultiError) AllErrors() []error { return m } + +// SelectClusterResponseValidationError is the validation error returned by +// SelectClusterResponse.Validate if the designated constraints aren't met. +type SelectClusterResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SelectClusterResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SelectClusterResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SelectClusterResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SelectClusterResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SelectClusterResponseValidationError) ErrorName() string { + return "SelectClusterResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e SelectClusterResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSelectClusterResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SelectClusterResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SelectClusterResponseValidationError{} diff --git a/gen/go/flyteidl2/cluster/service.pb.go b/gen/go/flyteidl2/cluster/service.pb.go new file mode 100644 index 0000000000..07a35b035e --- /dev/null +++ b/gen/go/flyteidl2/cluster/service.pb.go @@ -0,0 +1,93 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: flyteidl2/cluster/service.proto + +package cluster + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +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) +) + +var File_flyteidl2_cluster_service_proto protoreflect.FileDescriptor + +var file_flyteidl2_cluster_service_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x11, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x1a, 0x1f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x32, 0x76, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xc3, 0x01, 0x0a, 0x15, + 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x48, 0x02, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xa2, 0x02, + 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xca, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x32, 0x5c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xe2, 0x02, 0x1d, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x5c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_flyteidl2_cluster_service_proto_goTypes = []interface{}{ + (*SelectClusterRequest)(nil), // 0: flyteidl2.cluster.SelectClusterRequest + (*SelectClusterResponse)(nil), // 1: flyteidl2.cluster.SelectClusterResponse +} +var file_flyteidl2_cluster_service_proto_depIdxs = []int32{ + 0, // 0: flyteidl2.cluster.ClusterService.SelectCluster:input_type -> flyteidl2.cluster.SelectClusterRequest + 1, // 1: flyteidl2.cluster.ClusterService.SelectCluster:output_type -> flyteidl2.cluster.SelectClusterResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_flyteidl2_cluster_service_proto_init() } +func file_flyteidl2_cluster_service_proto_init() { + if File_flyteidl2_cluster_service_proto != nil { + return + } + file_flyteidl2_cluster_payload_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_flyteidl2_cluster_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_flyteidl2_cluster_service_proto_goTypes, + DependencyIndexes: file_flyteidl2_cluster_service_proto_depIdxs, + }.Build() + File_flyteidl2_cluster_service_proto = out.File + file_flyteidl2_cluster_service_proto_rawDesc = nil + file_flyteidl2_cluster_service_proto_goTypes = nil + file_flyteidl2_cluster_service_proto_depIdxs = nil +} diff --git a/gen/go/flyteidl2/cluster/service.pb.validate.go b/gen/go/flyteidl2/cluster/service.pb.validate.go new file mode 100644 index 0000000000..c395c97137 --- /dev/null +++ b/gen/go/flyteidl2/cluster/service.pb.validate.go @@ -0,0 +1,36 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: flyteidl2/cluster/service.proto + +package cluster + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) diff --git a/gen/go/flyteidl2/cluster/service_grpc.pb.go b/gen/go/flyteidl2/cluster/service_grpc.pb.go new file mode 100644 index 0000000000..d798b38b08 --- /dev/null +++ b/gen/go/flyteidl2/cluster/service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: flyteidl2/cluster/service.proto + +package cluster + +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 ( + ClusterService_SelectCluster_FullMethodName = "/flyteidl2.cluster.ClusterService/SelectCluster" +) + +// ClusterServiceClient is the client API for ClusterService 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 ClusterServiceClient interface { + SelectCluster(ctx context.Context, in *SelectClusterRequest, opts ...grpc.CallOption) (*SelectClusterResponse, error) +} + +type clusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient { + return &clusterServiceClient{cc} +} + +func (c *clusterServiceClient) SelectCluster(ctx context.Context, in *SelectClusterRequest, opts ...grpc.CallOption) (*SelectClusterResponse, error) { + out := new(SelectClusterResponse) + err := c.cc.Invoke(ctx, ClusterService_SelectCluster_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterServiceServer is the server API for ClusterService service. +// All implementations should embed UnimplementedClusterServiceServer +// for forward compatibility +type ClusterServiceServer interface { + SelectCluster(context.Context, *SelectClusterRequest) (*SelectClusterResponse, error) +} + +// UnimplementedClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedClusterServiceServer struct { +} + +func (UnimplementedClusterServiceServer) SelectCluster(context.Context, *SelectClusterRequest) (*SelectClusterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SelectCluster not implemented") +} + +// UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterServiceServer will +// result in compilation errors. +type UnsafeClusterServiceServer interface { + mustEmbedUnimplementedClusterServiceServer() +} + +func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer) { + s.RegisterService(&ClusterService_ServiceDesc, srv) +} + +func _ClusterService_SelectCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SelectClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).SelectCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_SelectCluster_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).SelectCluster(ctx, req.(*SelectClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "flyteidl2.cluster.ClusterService", + HandlerType: (*ClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SelectCluster", + Handler: _ClusterService_SelectCluster_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "flyteidl2/cluster/service.proto", +} diff --git a/gen/go/gateway/flyteidl2/cluster/payload.swagger.json b/gen/go/gateway/flyteidl2/cluster/payload.swagger.json new file mode 100644 index 0000000000..b0672b4b0e --- /dev/null +++ b/gen/go/gateway/flyteidl2/cluster/payload.swagger.json @@ -0,0 +1,50 @@ +{ + "swagger": "2.0", + "info": { + "title": "flyteidl2/cluster/payload.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } +} diff --git a/gen/go/gateway/flyteidl2/cluster/service.swagger.json b/gen/go/gateway/flyteidl2/cluster/service.swagger.json new file mode 100644 index 0000000000..7948723f58 --- /dev/null +++ b/gen/go/gateway/flyteidl2/cluster/service.swagger.json @@ -0,0 +1,55 @@ +{ + "swagger": "2.0", + "info": { + "title": "flyteidl2/cluster/service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ClusterService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } +} diff --git a/gen/python/flyteidl2/cluster/__init__.py b/gen/python/flyteidl2/cluster/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gen/python/flyteidl2/cluster/payload_pb2.py b/gen/python/flyteidl2/cluster/payload_pb2.py new file mode 100644 index 0000000000..3161d8af06 --- /dev/null +++ b/gen/python/flyteidl2/cluster/payload_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: flyteidl2/cluster/payload.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 +from flyteidl2.app import app_definition_pb2 as flyteidl2_dot_app_dot_app__definition__pb2 +from flyteidl2.common import identifier_pb2 as flyteidl2_dot_common_dot_identifier__pb2 +from flyteidl2.task import task_definition_pb2 as flyteidl2_dot_task_dot_task__definition__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x66lyteidl2/cluster/payload.proto\x12\x11\x66lyteidl2.cluster\x1a\x1b\x62uf/validate/validate.proto\x1a\"flyteidl2/app/app_definition.proto\x1a!flyteidl2/common/identifier.proto\x1a$flyteidl2/task/task_definition.proto\"\xa4\x06\n\x14SelectClusterRequest\x12\x38\n\x06org_id\x18\x01 \x01(\x0b\x32\x1f.flyteidl2.common.OrgIdentifierH\x00R\x05orgId\x12\x44\n\nproject_id\x18\x02 \x01(\x0b\x32#.flyteidl2.common.ProjectIdentifierH\x00R\tprojectId\x12\x39\n\x07task_id\x18\x03 \x01(\x0b\x32\x1e.flyteidl2.task.TaskIdentifierH\x00R\x06taskId\x12\x41\n\taction_id\x18\x04 \x01(\x0b\x32\".flyteidl2.common.ActionIdentifierH\x00R\x08\x61\x63tionId\x12W\n\x11\x61\x63tion_attempt_id\x18\x05 \x01(\x0b\x32).flyteidl2.common.ActionAttemptIdentifierH\x00R\x0f\x61\x63tionAttemptId\x12\x32\n\x06\x61pp_id\x18\x06 \x01(\x0b\x32\x19.flyteidl2.app.IdentifierH\x00R\x05\x61ppId\x12Y\n\toperation\x18\x08 \x01(\x0e\x32\x31.flyteidl2.cluster.SelectClusterRequest.OperationB\x08\xbaH\x05\x82\x01\x02 \x00R\toperation\"\x92\x02\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12$\n OPERATION_CREATE_UPLOAD_LOCATION\x10\x01\x12\x1b\n\x17OPERATION_UPLOAD_INPUTS\x10\x02\x12\x1d\n\x19OPERATION_GET_ACTION_DATA\x10\x03\x12!\n\x1dOPERATION_QUERY_RANGE_METRICS\x10\x04\x12\"\n\x1eOPERATION_CREATE_DOWNLOAD_LINK\x10\x05\x12\x17\n\x13OPERATION_TAIL_LOGS\x10\x06\x12(\n$OPERATION_GET_ACTION_ATTEMPT_METRICS\x10\x07\x42\x11\n\x08resource\x12\x05\xbaH\x02\x08\x01\"B\n\x15SelectClusterResponse\x12)\n\x10\x63luster_endpoint\x18\x01 \x01(\tR\x0f\x63lusterEndpointB\xc3\x01\n\x15\x63om.flyteidl2.clusterB\x0cPayloadProtoH\x02P\x01Z5github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster\xa2\x02\x03\x46\x43X\xaa\x02\x11\x46lyteidl2.Cluster\xca\x02\x11\x46lyteidl2\\Cluster\xe2\x02\x1d\x46lyteidl2\\Cluster\\GPBMetadata\xea\x02\x12\x46lyteidl2::Clusterb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flyteidl2.cluster.payload_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\025com.flyteidl2.clusterB\014PayloadProtoH\002P\001Z5github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster\242\002\003FCX\252\002\021Flyteidl2.Cluster\312\002\021Flyteidl2\\Cluster\342\002\035Flyteidl2\\Cluster\\GPBMetadata\352\002\022Flyteidl2::Cluster' + _SELECTCLUSTERREQUEST.oneofs_by_name['resource']._options = None + _SELECTCLUSTERREQUEST.oneofs_by_name['resource']._serialized_options = b'\272H\002\010\001' + _SELECTCLUSTERREQUEST.fields_by_name['operation']._options = None + _SELECTCLUSTERREQUEST.fields_by_name['operation']._serialized_options = b'\272H\005\202\001\002 \000' + _globals['_SELECTCLUSTERREQUEST']._serialized_start=193 + _globals['_SELECTCLUSTERREQUEST']._serialized_end=997 + _globals['_SELECTCLUSTERREQUEST_OPERATION']._serialized_start=704 + _globals['_SELECTCLUSTERREQUEST_OPERATION']._serialized_end=978 + _globals['_SELECTCLUSTERRESPONSE']._serialized_start=999 + _globals['_SELECTCLUSTERRESPONSE']._serialized_end=1065 +# @@protoc_insertion_point(module_scope) diff --git a/gen/python/flyteidl2/cluster/payload_pb2.pyi b/gen/python/flyteidl2/cluster/payload_pb2.pyi new file mode 100644 index 0000000000..6c8fbea52f --- /dev/null +++ b/gen/python/flyteidl2/cluster/payload_pb2.pyi @@ -0,0 +1,52 @@ +from buf.validate import validate_pb2 as _validate_pb2 +from flyteidl2.app import app_definition_pb2 as _app_definition_pb2 +from flyteidl2.common import identifier_pb2 as _identifier_pb2 +from flyteidl2.task import task_definition_pb2 as _task_definition_pb2 +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class SelectClusterRequest(_message.Message): + __slots__ = ["org_id", "project_id", "task_id", "action_id", "action_attempt_id", "app_id", "operation"] + class Operation(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + OPERATION_UNSPECIFIED: _ClassVar[SelectClusterRequest.Operation] + OPERATION_CREATE_UPLOAD_LOCATION: _ClassVar[SelectClusterRequest.Operation] + OPERATION_UPLOAD_INPUTS: _ClassVar[SelectClusterRequest.Operation] + OPERATION_GET_ACTION_DATA: _ClassVar[SelectClusterRequest.Operation] + OPERATION_QUERY_RANGE_METRICS: _ClassVar[SelectClusterRequest.Operation] + OPERATION_CREATE_DOWNLOAD_LINK: _ClassVar[SelectClusterRequest.Operation] + OPERATION_TAIL_LOGS: _ClassVar[SelectClusterRequest.Operation] + OPERATION_GET_ACTION_ATTEMPT_METRICS: _ClassVar[SelectClusterRequest.Operation] + OPERATION_UNSPECIFIED: SelectClusterRequest.Operation + OPERATION_CREATE_UPLOAD_LOCATION: SelectClusterRequest.Operation + OPERATION_UPLOAD_INPUTS: SelectClusterRequest.Operation + OPERATION_GET_ACTION_DATA: SelectClusterRequest.Operation + OPERATION_QUERY_RANGE_METRICS: SelectClusterRequest.Operation + OPERATION_CREATE_DOWNLOAD_LINK: SelectClusterRequest.Operation + OPERATION_TAIL_LOGS: SelectClusterRequest.Operation + OPERATION_GET_ACTION_ATTEMPT_METRICS: SelectClusterRequest.Operation + ORG_ID_FIELD_NUMBER: _ClassVar[int] + PROJECT_ID_FIELD_NUMBER: _ClassVar[int] + TASK_ID_FIELD_NUMBER: _ClassVar[int] + ACTION_ID_FIELD_NUMBER: _ClassVar[int] + ACTION_ATTEMPT_ID_FIELD_NUMBER: _ClassVar[int] + APP_ID_FIELD_NUMBER: _ClassVar[int] + OPERATION_FIELD_NUMBER: _ClassVar[int] + org_id: _identifier_pb2.OrgIdentifier + project_id: _identifier_pb2.ProjectIdentifier + task_id: _task_definition_pb2.TaskIdentifier + action_id: _identifier_pb2.ActionIdentifier + action_attempt_id: _identifier_pb2.ActionAttemptIdentifier + app_id: _app_definition_pb2.Identifier + operation: SelectClusterRequest.Operation + def __init__(self, org_id: _Optional[_Union[_identifier_pb2.OrgIdentifier, _Mapping]] = ..., project_id: _Optional[_Union[_identifier_pb2.ProjectIdentifier, _Mapping]] = ..., task_id: _Optional[_Union[_task_definition_pb2.TaskIdentifier, _Mapping]] = ..., action_id: _Optional[_Union[_identifier_pb2.ActionIdentifier, _Mapping]] = ..., action_attempt_id: _Optional[_Union[_identifier_pb2.ActionAttemptIdentifier, _Mapping]] = ..., app_id: _Optional[_Union[_app_definition_pb2.Identifier, _Mapping]] = ..., operation: _Optional[_Union[SelectClusterRequest.Operation, str]] = ...) -> None: ... + +class SelectClusterResponse(_message.Message): + __slots__ = ["cluster_endpoint"] + CLUSTER_ENDPOINT_FIELD_NUMBER: _ClassVar[int] + cluster_endpoint: str + def __init__(self, cluster_endpoint: _Optional[str] = ...) -> None: ... diff --git a/gen/python/flyteidl2/cluster/payload_pb2_grpc.py b/gen/python/flyteidl2/cluster/payload_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/gen/python/flyteidl2/cluster/payload_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/gen/python/flyteidl2/cluster/service_connect.py b/gen/python/flyteidl2/cluster/service_connect.py new file mode 100644 index 0000000000..117d1256ce --- /dev/null +++ b/gen/python/flyteidl2/cluster/service_connect.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT! +# source: flyteidl2/cluster/service.proto + +from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping +from typing import Protocol + +from connectrpc.client import ConnectClient, ConnectClientSync +from connectrpc.code import Code +from connectrpc.compression import Compression +from connectrpc.errors import ConnectError +from connectrpc.interceptor import Interceptor, InterceptorSync +from connectrpc.method import IdempotencyLevel, MethodInfo +from connectrpc.request import Headers, RequestContext +from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync +import flyteidl2.cluster.payload_pb2 as flyteidl2_dot_cluster_dot_payload__pb2 + + +class ClusterService(Protocol): + async def select_cluster(self, request: flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest, ctx: RequestContext) -> flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse: + raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") + + +class ClusterServiceASGIApplication(ConnectASGIApplication[ClusterService]): + def __init__(self, service: ClusterService | AsyncGenerator[ClusterService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None: + super().__init__( + service=service, + endpoints=lambda svc: { + "/flyteidl2.cluster.ClusterService/SelectCluster": Endpoint.unary( + method=MethodInfo( + name="SelectCluster", + service_name="flyteidl2.cluster.ClusterService", + input=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest, + output=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse, + idempotency_level=IdempotencyLevel.UNKNOWN, + ), + function=svc.select_cluster, + ), + }, + interceptors=interceptors, + read_max_bytes=read_max_bytes, + compressions=compressions, + ) + + @property + def path(self) -> str: + """Returns the URL path to mount the application to when serving multiple applications.""" + return "/flyteidl2.cluster.ClusterService" + + +class ClusterServiceClient(ConnectClient): + async def select_cluster( + self, + request: flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest, + *, + headers: Headers | Mapping[str, str] | None = None, + timeout_ms: int | None = None, + ) -> flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse: + return await self.execute_unary( + request=request, + method=MethodInfo( + name="SelectCluster", + service_name="flyteidl2.cluster.ClusterService", + input=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest, + output=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse, + idempotency_level=IdempotencyLevel.UNKNOWN, + ), + headers=headers, + timeout_ms=timeout_ms, + ) + + +class ClusterServiceSync(Protocol): + def select_cluster(self, request: flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest, ctx: RequestContext) -> flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse: + raise ConnectError(Code.UNIMPLEMENTED, "Not implemented") + + +class ClusterServiceWSGIApplication(ConnectWSGIApplication): + def __init__(self, service: ClusterServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None: + super().__init__( + endpoints={ + "/flyteidl2.cluster.ClusterService/SelectCluster": EndpointSync.unary( + method=MethodInfo( + name="SelectCluster", + service_name="flyteidl2.cluster.ClusterService", + input=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest, + output=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse, + idempotency_level=IdempotencyLevel.UNKNOWN, + ), + function=service.select_cluster, + ), + }, + interceptors=interceptors, + read_max_bytes=read_max_bytes, + compressions=compressions, + ) + + @property + def path(self) -> str: + """Returns the URL path to mount the application to when serving multiple applications.""" + return "/flyteidl2.cluster.ClusterService" + + +class ClusterServiceClientSync(ConnectClientSync): + def select_cluster( + self, + request: flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest, + *, + headers: Headers | Mapping[str, str] | None = None, + timeout_ms: int | None = None, + ) -> flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse: + return self.execute_unary( + request=request, + method=MethodInfo( + name="SelectCluster", + service_name="flyteidl2.cluster.ClusterService", + input=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest, + output=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse, + idempotency_level=IdempotencyLevel.UNKNOWN, + ), + headers=headers, + timeout_ms=timeout_ms, + ) diff --git a/gen/python/flyteidl2/cluster/service_pb2.py b/gen/python/flyteidl2/cluster/service_pb2.py new file mode 100644 index 0000000000..552493f2a1 --- /dev/null +++ b/gen/python/flyteidl2/cluster/service_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: flyteidl2/cluster/service.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from flyteidl2.cluster import payload_pb2 as flyteidl2_dot_cluster_dot_payload__pb2 +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x66lyteidl2/cluster/service.proto\x12\x11\x66lyteidl2.cluster\x1a\x1f\x66lyteidl2/cluster/payload.proto\x1a\x1cgoogle/api/annotations.proto2v\n\x0e\x43lusterService\x12\x64\n\rSelectCluster\x12\'.flyteidl2.cluster.SelectClusterRequest\x1a(.flyteidl2.cluster.SelectClusterResponse\"\x00\x42\xc3\x01\n\x15\x63om.flyteidl2.clusterB\x0cServiceProtoH\x02P\x01Z5github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster\xa2\x02\x03\x46\x43X\xaa\x02\x11\x46lyteidl2.Cluster\xca\x02\x11\x46lyteidl2\\Cluster\xe2\x02\x1d\x46lyteidl2\\Cluster\\GPBMetadata\xea\x02\x12\x46lyteidl2::Clusterb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flyteidl2.cluster.service_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\025com.flyteidl2.clusterB\014ServiceProtoH\002P\001Z5github.com/flyteorg/flyte/v2/gen/go/flyteidl2/cluster\242\002\003FCX\252\002\021Flyteidl2.Cluster\312\002\021Flyteidl2\\Cluster\342\002\035Flyteidl2\\Cluster\\GPBMetadata\352\002\022Flyteidl2::Cluster' + _globals['_CLUSTERSERVICE']._serialized_start=117 + _globals['_CLUSTERSERVICE']._serialized_end=235 +# @@protoc_insertion_point(module_scope) diff --git a/gen/python/flyteidl2/cluster/service_pb2.pyi b/gen/python/flyteidl2/cluster/service_pb2.pyi new file mode 100644 index 0000000000..d89531c6a5 --- /dev/null +++ b/gen/python/flyteidl2/cluster/service_pb2.pyi @@ -0,0 +1,6 @@ +from flyteidl2.cluster import payload_pb2 as _payload_pb2 +from google.api import annotations_pb2 as _annotations_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/gen/python/flyteidl2/cluster/service_pb2_grpc.py b/gen/python/flyteidl2/cluster/service_pb2_grpc.py new file mode 100644 index 0000000000..8f052a2913 --- /dev/null +++ b/gen/python/flyteidl2/cluster/service_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from flyteidl2.cluster import payload_pb2 as flyteidl2_dot_cluster_dot_payload__pb2 + + +class ClusterServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SelectCluster = channel.unary_unary( + '/flyteidl2.cluster.ClusterService/SelectCluster', + request_serializer=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest.SerializeToString, + response_deserializer=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse.FromString, + ) + + +class ClusterServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def SelectCluster(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ClusterServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SelectCluster': grpc.unary_unary_rpc_method_handler( + servicer.SelectCluster, + request_deserializer=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest.FromString, + response_serializer=flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'flyteidl2.cluster.ClusterService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ClusterService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def SelectCluster(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl2.cluster.ClusterService/SelectCluster', + flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterRequest.SerializeToString, + flyteidl2_dot_cluster_dot_payload__pb2.SelectClusterResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/gen/rust/src/flyteidl2.cluster.rs b/gen/rust/src/flyteidl2.cluster.rs new file mode 100644 index 0000000000..3a214bba4c --- /dev/null +++ b/gen/rust/src/flyteidl2.cluster.rs @@ -0,0 +1,274 @@ +// @generated +// This file is @generated by prost-build. +#[pyo3::pyclass(dict, get_all, set_all)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SelectClusterRequest { + #[prost(enumeration="select_cluster_request::Operation", tag="8")] + pub operation: i32, + #[prost(oneof="select_cluster_request::Resource", tags="1, 2, 3, 4, 5, 6")] + pub resource: ::core::option::Option, +} +/// Nested message and enum types in `SelectClusterRequest`. +pub mod select_cluster_request { + #[pyo3::pyclass(dict, get_all, set_all)] + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Operation { + Unspecified = 0, + CreateUploadLocation = 1, + UploadInputs = 2, + GetActionData = 3, + QueryRangeMetrics = 4, + CreateDownloadLink = 5, + TailLogs = 6, + GetActionAttemptMetrics = 7, + } + impl Operation { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Operation::Unspecified => "OPERATION_UNSPECIFIED", + Operation::CreateUploadLocation => "OPERATION_CREATE_UPLOAD_LOCATION", + Operation::UploadInputs => "OPERATION_UPLOAD_INPUTS", + Operation::GetActionData => "OPERATION_GET_ACTION_DATA", + Operation::QueryRangeMetrics => "OPERATION_QUERY_RANGE_METRICS", + Operation::CreateDownloadLink => "OPERATION_CREATE_DOWNLOAD_LINK", + Operation::TailLogs => "OPERATION_TAIL_LOGS", + Operation::GetActionAttemptMetrics => "OPERATION_GET_ACTION_ATTEMPT_METRICS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OPERATION_UNSPECIFIED" => Some(Self::Unspecified), + "OPERATION_CREATE_UPLOAD_LOCATION" => Some(Self::CreateUploadLocation), + "OPERATION_UPLOAD_INPUTS" => Some(Self::UploadInputs), + "OPERATION_GET_ACTION_DATA" => Some(Self::GetActionData), + "OPERATION_QUERY_RANGE_METRICS" => Some(Self::QueryRangeMetrics), + "OPERATION_CREATE_DOWNLOAD_LINK" => Some(Self::CreateDownloadLink), + "OPERATION_TAIL_LOGS" => Some(Self::TailLogs), + "OPERATION_GET_ACTION_ATTEMPT_METRICS" => Some(Self::GetActionAttemptMetrics), + _ => None, + } + } + } + #[pyo3::pyclass(dict, get_all, set_all)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Resource { + #[prost(message, tag="1")] + OrgId(super::super::common::OrgIdentifier), + #[prost(message, tag="2")] + ProjectId(super::super::common::ProjectIdentifier), + #[prost(message, tag="3")] + TaskId(super::super::task::TaskIdentifier), + #[prost(message, tag="4")] + ActionId(super::super::common::ActionIdentifier), + #[prost(message, tag="5")] + ActionAttemptId(super::super::common::ActionAttemptIdentifier), + #[prost(message, tag="6")] + AppId(super::super::app::Identifier), + } +} +#[pyo3::pyclass(dict, get_all, set_all)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SelectClusterResponse { + #[prost(string, tag="1")] + pub cluster_endpoint: ::prost::alloc::string::String, +} +/// Encoded file descriptor set for the `flyteidl2.cluster` package +pub const FILE_DESCRIPTOR_SET: &[u8] = &[ + 0x0a, 0xc1, 0x12, 0x0a, 0x1f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, + 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xa4, 0x06, 0x0a, 0x14, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x6f, 0x72, + 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, + 0x67, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, + 0x72, 0x67, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x74, + 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x49, + 0x64, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x61, 0x70, + 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, + 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x59, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x82, 0x01, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x92, 0x02, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, + 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x4f, 0x50, 0x45, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, + 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, + 0x1b, 0x0a, 0x17, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x4c, + 0x4f, 0x41, 0x44, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x53, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, + 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x4f, + 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x52, + 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x53, 0x10, 0x04, 0x12, 0x22, + 0x0a, 0x1e, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, + 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x4c, 0x4f, 0x47, 0x53, 0x10, 0x06, 0x12, 0x28, 0x0a, 0x24, 0x4f, + 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x54, 0x54, 0x45, 0x4d, 0x50, 0x54, 0x5f, 0x4d, 0x45, 0x54, 0x52, + 0x49, 0x43, 0x53, 0x10, 0x07, 0x42, 0x11, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x42, 0x0a, 0x15, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0xc1, 0x01, 0x0a, + 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xa2, 0x02, 0x03, + 0x46, 0x43, 0x58, 0xaa, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xca, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x32, 0x5c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xe2, 0x02, 0x1d, 0x46, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x5c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x46, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4a, 0xc9, 0x08, 0x0a, 0x06, 0x12, 0x04, 0x00, 0x00, 0x28, 0x01, 0x0a, 0x08, 0x0a, 0x01, 0x0c, + 0x12, 0x03, 0x00, 0x00, 0x12, 0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, 0x03, 0x02, 0x00, 0x1a, 0x0a, + 0x09, 0x0a, 0x02, 0x03, 0x00, 0x12, 0x03, 0x04, 0x00, 0x25, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x01, + 0x12, 0x03, 0x05, 0x00, 0x2c, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x02, 0x12, 0x03, 0x06, 0x00, 0x2b, + 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x03, 0x12, 0x03, 0x07, 0x00, 0x2e, 0x0a, 0x08, 0x0a, 0x01, 0x08, + 0x12, 0x03, 0x09, 0x00, 0x4c, 0x0a, 0x09, 0x0a, 0x02, 0x08, 0x0b, 0x12, 0x03, 0x09, 0x00, 0x4c, + 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x00, 0x12, 0x04, 0x0b, 0x00, 0x24, 0x01, 0x0a, 0x0a, 0x0a, 0x03, + 0x04, 0x00, 0x01, 0x12, 0x03, 0x0b, 0x08, 0x1c, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x00, 0x08, 0x00, + 0x12, 0x04, 0x0c, 0x02, 0x14, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x08, 0x00, 0x01, 0x12, + 0x03, 0x0c, 0x08, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x08, 0x00, 0x02, 0x12, 0x03, 0x0d, + 0x04, 0x30, 0x0a, 0x0f, 0x0a, 0x08, 0x04, 0x00, 0x08, 0x00, 0x02, 0x87, 0x09, 0x01, 0x12, 0x03, + 0x0d, 0x04, 0x30, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x0e, 0x04, 0x2e, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x06, 0x12, 0x03, 0x0e, 0x04, 0x22, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x0e, 0x23, 0x29, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x0e, 0x2c, 0x2d, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, + 0x02, 0x01, 0x12, 0x03, 0x0f, 0x04, 0x36, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x06, + 0x12, 0x03, 0x0f, 0x04, 0x26, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, + 0x0f, 0x27, 0x31, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x0f, 0x34, + 0x35, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12, 0x03, 0x10, 0x04, 0x2e, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x06, 0x12, 0x03, 0x10, 0x04, 0x21, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x10, 0x22, 0x29, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, + 0x02, 0x02, 0x03, 0x12, 0x03, 0x10, 0x2c, 0x2d, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x03, + 0x12, 0x03, 0x11, 0x04, 0x34, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x06, 0x12, 0x03, + 0x11, 0x04, 0x25, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x01, 0x12, 0x03, 0x11, 0x26, + 0x2f, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x03, 0x12, 0x03, 0x11, 0x32, 0x33, 0x0a, + 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x04, 0x12, 0x03, 0x12, 0x04, 0x43, 0x0a, 0x0c, 0x0a, 0x05, + 0x04, 0x00, 0x02, 0x04, 0x06, 0x12, 0x03, 0x12, 0x04, 0x2c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, + 0x02, 0x04, 0x01, 0x12, 0x03, 0x12, 0x2d, 0x3e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x04, + 0x03, 0x12, 0x03, 0x12, 0x41, 0x42, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x05, 0x12, 0x03, + 0x13, 0x04, 0x28, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x05, 0x06, 0x12, 0x03, 0x13, 0x04, + 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x05, 0x01, 0x12, 0x03, 0x13, 0x1d, 0x23, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x05, 0x03, 0x12, 0x03, 0x13, 0x26, 0x27, 0x0a, 0x0c, 0x0a, + 0x04, 0x04, 0x00, 0x04, 0x00, 0x12, 0x04, 0x16, 0x02, 0x1f, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x00, 0x04, 0x00, 0x01, 0x12, 0x03, 0x16, 0x07, 0x10, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x00, 0x04, + 0x00, 0x02, 0x00, 0x12, 0x03, 0x17, 0x04, 0x1e, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, + 0x02, 0x00, 0x01, 0x12, 0x03, 0x17, 0x04, 0x19, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, + 0x02, 0x00, 0x02, 0x12, 0x03, 0x17, 0x1c, 0x1d, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x00, 0x04, 0x00, + 0x02, 0x01, 0x12, 0x03, 0x18, 0x04, 0x29, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, + 0x01, 0x01, 0x12, 0x03, 0x18, 0x04, 0x24, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, + 0x01, 0x02, 0x12, 0x03, 0x18, 0x27, 0x28, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x00, 0x04, 0x00, 0x02, + 0x02, 0x12, 0x03, 0x19, 0x04, 0x20, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x02, + 0x01, 0x12, 0x03, 0x19, 0x04, 0x1b, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x02, + 0x02, 0x12, 0x03, 0x19, 0x1e, 0x1f, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x00, 0x04, 0x00, 0x02, 0x03, + 0x12, 0x03, 0x1a, 0x04, 0x22, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x03, 0x01, + 0x12, 0x03, 0x1a, 0x04, 0x1d, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x03, 0x02, + 0x12, 0x03, 0x1a, 0x20, 0x21, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x00, 0x04, 0x00, 0x02, 0x04, 0x12, + 0x03, 0x1b, 0x04, 0x26, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x04, 0x01, 0x12, + 0x03, 0x1b, 0x04, 0x21, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x04, 0x02, 0x12, + 0x03, 0x1b, 0x24, 0x25, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x00, 0x04, 0x00, 0x02, 0x05, 0x12, 0x03, + 0x1c, 0x04, 0x27, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x05, 0x01, 0x12, 0x03, + 0x1c, 0x04, 0x22, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x05, 0x02, 0x12, 0x03, + 0x1c, 0x25, 0x26, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x00, 0x04, 0x00, 0x02, 0x06, 0x12, 0x03, 0x1d, + 0x04, 0x1c, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x06, 0x01, 0x12, 0x03, 0x1d, + 0x04, 0x17, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x06, 0x02, 0x12, 0x03, 0x1d, + 0x1a, 0x1b, 0x0a, 0x0d, 0x0a, 0x06, 0x04, 0x00, 0x04, 0x00, 0x02, 0x07, 0x12, 0x03, 0x1e, 0x04, + 0x2d, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x07, 0x01, 0x12, 0x03, 0x1e, 0x04, + 0x28, 0x0a, 0x0e, 0x0a, 0x07, 0x04, 0x00, 0x04, 0x00, 0x02, 0x07, 0x02, 0x12, 0x03, 0x1e, 0x2b, + 0x2c, 0x0a, 0x0c, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x06, 0x12, 0x04, 0x21, 0x02, 0x23, 0x05, 0x0a, + 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x06, 0x06, 0x12, 0x03, 0x21, 0x02, 0x0b, 0x0a, 0x0c, 0x0a, + 0x05, 0x04, 0x00, 0x02, 0x06, 0x01, 0x12, 0x03, 0x21, 0x0c, 0x15, 0x0a, 0x0c, 0x0a, 0x05, 0x04, + 0x00, 0x02, 0x06, 0x03, 0x12, 0x03, 0x21, 0x18, 0x19, 0x0a, 0x0d, 0x0a, 0x05, 0x04, 0x00, 0x02, + 0x06, 0x08, 0x12, 0x04, 0x21, 0x1a, 0x23, 0x04, 0x0a, 0x10, 0x0a, 0x08, 0x04, 0x00, 0x02, 0x06, + 0x08, 0x87, 0x09, 0x10, 0x12, 0x04, 0x21, 0x1b, 0x23, 0x03, 0x0a, 0x11, 0x0a, 0x0a, 0x04, 0x00, + 0x02, 0x06, 0x08, 0x87, 0x09, 0x10, 0x04, 0x00, 0x12, 0x03, 0x22, 0x0d, 0x0e, 0x0a, 0x0a, 0x0a, + 0x02, 0x04, 0x01, 0x12, 0x04, 0x26, 0x00, 0x28, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, + 0x12, 0x03, 0x26, 0x08, 0x1d, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x00, 0x12, 0x03, 0x27, + 0x02, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, 0x12, 0x03, 0x27, 0x02, 0x08, + 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x27, 0x09, 0x19, 0x0a, 0x0c, + 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x27, 0x1c, 0x1d, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, 0x0a, 0xd0, 0x04, 0x0a, 0x1f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x1f, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x76, 0x0a, 0x0e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0xc1, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, + 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x11, 0x46, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xca, 0x02, 0x11, + 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x5c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0xe2, 0x02, 0x1d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x5c, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x12, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x32, 0x3a, 0x3a, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x96, 0x01, 0x0a, 0x06, 0x12, 0x04, 0x00, 0x00, 0x0b, + 0x01, 0x0a, 0x08, 0x0a, 0x01, 0x0c, 0x12, 0x03, 0x00, 0x00, 0x12, 0x0a, 0x08, 0x0a, 0x01, 0x02, + 0x12, 0x03, 0x02, 0x00, 0x1a, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x00, 0x12, 0x03, 0x04, 0x00, 0x29, + 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x01, 0x12, 0x03, 0x05, 0x00, 0x26, 0x0a, 0x08, 0x0a, 0x01, 0x08, + 0x12, 0x03, 0x07, 0x00, 0x4c, 0x0a, 0x09, 0x0a, 0x02, 0x08, 0x0b, 0x12, 0x03, 0x07, 0x00, 0x4c, + 0x0a, 0x0a, 0x0a, 0x02, 0x06, 0x00, 0x12, 0x04, 0x09, 0x00, 0x0b, 0x01, 0x0a, 0x0a, 0x0a, 0x03, + 0x06, 0x00, 0x01, 0x12, 0x03, 0x09, 0x08, 0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x00, + 0x12, 0x03, 0x0a, 0x02, 0x4c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, + 0x0a, 0x06, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x02, 0x12, 0x03, 0x0a, 0x14, + 0x28, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x0a, 0x33, 0x48, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +]; +include!("flyteidl2.cluster.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/gen/rust/src/flyteidl2.cluster.tonic.rs b/gen/rust/src/flyteidl2.cluster.tonic.rs new file mode 100644 index 0000000000..7649641b87 --- /dev/null +++ b/gen/rust/src/flyteidl2.cluster.tonic.rs @@ -0,0 +1,285 @@ +// @generated +/// Generated client implementations. +pub mod cluster_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct ClusterServiceClient { + inner: tonic::client::Grpc, + } + impl ClusterServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ClusterServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> ClusterServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ClusterServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn select_cluster( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/flyteidl2.cluster.ClusterService/SelectCluster", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("flyteidl2.cluster.ClusterService", "SelectCluster"), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod cluster_service_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with ClusterServiceServer. + #[async_trait] + pub trait ClusterService: Send + Sync + 'static { + async fn select_cluster( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct ClusterServiceServer { + inner: Arc, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + impl ClusterServiceServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for ClusterServiceServer + where + T: ClusterService, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + match req.uri().path() { + "/flyteidl2.cluster.ClusterService/SelectCluster" => { + #[allow(non_camel_case_types)] + struct SelectClusterSvc(pub Arc); + impl< + T: ClusterService, + > tonic::server::UnaryService + for SelectClusterSvc { + type Response = super::SelectClusterResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::select_cluster(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = SelectClusterSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for ClusterServiceServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl tonic::server::NamedService for ClusterServiceServer { + const NAME: &'static str = "flyteidl2.cluster.ClusterService"; + } +} diff --git a/gen/ts/flyteidl2/cluster/payload_pb.ts b/gen/ts/flyteidl2/cluster/payload_pb.ts new file mode 100644 index 0000000000..5fdd2d42cf --- /dev/null +++ b/gen/ts/flyteidl2/cluster/payload_pb.ts @@ -0,0 +1,147 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.ts" +// @generated from file flyteidl2/cluster/payload.proto (package flyteidl2.cluster, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_buf_validate_validate } from "../../buf/validate/validate_pb.ts"; +import type { Identifier } from "../app/app_definition_pb.ts"; +import { file_flyteidl2_app_app_definition } from "../app/app_definition_pb.ts"; +import type { ActionAttemptIdentifier, ActionIdentifier, OrgIdentifier, ProjectIdentifier } from "../common/identifier_pb.ts"; +import { file_flyteidl2_common_identifier } from "../common/identifier_pb.ts"; +import type { TaskIdentifier } from "../task/task_definition_pb.ts"; +import { file_flyteidl2_task_task_definition } from "../task/task_definition_pb.ts"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file flyteidl2/cluster/payload.proto. + */ +export const file_flyteidl2_cluster_payload: GenFile = /*@__PURE__*/ + fileDesc("Ch9mbHl0ZWlkbDIvY2x1c3Rlci9wYXlsb2FkLnByb3RvEhFmbHl0ZWlkbDIuY2x1c3RlciLdBQoUU2VsZWN0Q2x1c3RlclJlcXVlc3QSMQoGb3JnX2lkGAEgASgLMh8uZmx5dGVpZGwyLmNvbW1vbi5PcmdJZGVudGlmaWVySAASOQoKcHJvamVjdF9pZBgCIAEoCzIjLmZseXRlaWRsMi5jb21tb24uUHJvamVjdElkZW50aWZpZXJIABIxCgd0YXNrX2lkGAMgASgLMh4uZmx5dGVpZGwyLnRhc2suVGFza0lkZW50aWZpZXJIABI3CglhY3Rpb25faWQYBCABKAsyIi5mbHl0ZWlkbDIuY29tbW9uLkFjdGlvbklkZW50aWZpZXJIABJGChFhY3Rpb25fYXR0ZW1wdF9pZBgFIAEoCzIpLmZseXRlaWRsMi5jb21tb24uQWN0aW9uQXR0ZW1wdElkZW50aWZpZXJIABIrCgZhcHBfaWQYBiABKAsyGS5mbHl0ZWlkbDIuYXBwLklkZW50aWZpZXJIABJOCglvcGVyYXRpb24YCCABKA4yMS5mbHl0ZWlkbDIuY2x1c3Rlci5TZWxlY3RDbHVzdGVyUmVxdWVzdC5PcGVyYXRpb25CCLpIBYIBAiAAIpICCglPcGVyYXRpb24SGQoVT1BFUkFUSU9OX1VOU1BFQ0lGSUVEEAASJAogT1BFUkFUSU9OX0NSRUFURV9VUExPQURfTE9DQVRJT04QARIbChdPUEVSQVRJT05fVVBMT0FEX0lOUFVUUxACEh0KGU9QRVJBVElPTl9HRVRfQUNUSU9OX0RBVEEQAxIhCh1PUEVSQVRJT05fUVVFUllfUkFOR0VfTUVUUklDUxAEEiIKHk9QRVJBVElPTl9DUkVBVEVfRE9XTkxPQURfTElOSxAFEhcKE09QRVJBVElPTl9UQUlMX0xPR1MQBhIoCiRPUEVSQVRJT05fR0VUX0FDVElPTl9BVFRFTVBUX01FVFJJQ1MQB0IRCghyZXNvdXJjZRIFukgCCAEiMQoVU2VsZWN0Q2x1c3RlclJlc3BvbnNlEhgKEGNsdXN0ZXJfZW5kcG9pbnQYASABKAlCwwEKFWNvbS5mbHl0ZWlkbDIuY2x1c3RlckIMUGF5bG9hZFByb3RvSAJQAVo1Z2l0aHViLmNvbS9mbHl0ZW9yZy9mbHl0ZS92Mi9nZW4vZ28vZmx5dGVpZGwyL2NsdXN0ZXKiAgNGQ1iqAhFGbHl0ZWlkbDIuQ2x1c3RlcsoCEUZseXRlaWRsMlxDbHVzdGVy4gIdRmx5dGVpZGwyXENsdXN0ZXJcR1BCTWV0YWRhdGHqAhJGbHl0ZWlkbDI6OkNsdXN0ZXJiBnByb3RvMw", [file_buf_validate_validate, file_flyteidl2_app_app_definition, file_flyteidl2_common_identifier, file_flyteidl2_task_task_definition]); + +/** + * @generated from message flyteidl2.cluster.SelectClusterRequest + */ +export type SelectClusterRequest = Message<"flyteidl2.cluster.SelectClusterRequest"> & { + /** + * @generated from oneof flyteidl2.cluster.SelectClusterRequest.resource + */ + resource: { + /** + * @generated from field: flyteidl2.common.OrgIdentifier org_id = 1; + */ + value: OrgIdentifier; + case: "orgId"; + } | { + /** + * @generated from field: flyteidl2.common.ProjectIdentifier project_id = 2; + */ + value: ProjectIdentifier; + case: "projectId"; + } | { + /** + * @generated from field: flyteidl2.task.TaskIdentifier task_id = 3; + */ + value: TaskIdentifier; + case: "taskId"; + } | { + /** + * @generated from field: flyteidl2.common.ActionIdentifier action_id = 4; + */ + value: ActionIdentifier; + case: "actionId"; + } | { + /** + * @generated from field: flyteidl2.common.ActionAttemptIdentifier action_attempt_id = 5; + */ + value: ActionAttemptIdentifier; + case: "actionAttemptId"; + } | { + /** + * @generated from field: flyteidl2.app.Identifier app_id = 6; + */ + value: Identifier; + case: "appId"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: flyteidl2.cluster.SelectClusterRequest.Operation operation = 8; + */ + operation: SelectClusterRequest_Operation; +}; + +/** + * Describes the message flyteidl2.cluster.SelectClusterRequest. + * Use `create(SelectClusterRequestSchema)` to create a new message. + */ +export const SelectClusterRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_flyteidl2_cluster_payload, 0); + +/** + * @generated from enum flyteidl2.cluster.SelectClusterRequest.Operation + */ +export enum SelectClusterRequest_Operation { + /** + * @generated from enum value: OPERATION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: OPERATION_CREATE_UPLOAD_LOCATION = 1; + */ + CREATE_UPLOAD_LOCATION = 1, + + /** + * @generated from enum value: OPERATION_UPLOAD_INPUTS = 2; + */ + UPLOAD_INPUTS = 2, + + /** + * @generated from enum value: OPERATION_GET_ACTION_DATA = 3; + */ + GET_ACTION_DATA = 3, + + /** + * @generated from enum value: OPERATION_QUERY_RANGE_METRICS = 4; + */ + QUERY_RANGE_METRICS = 4, + + /** + * @generated from enum value: OPERATION_CREATE_DOWNLOAD_LINK = 5; + */ + CREATE_DOWNLOAD_LINK = 5, + + /** + * @generated from enum value: OPERATION_TAIL_LOGS = 6; + */ + TAIL_LOGS = 6, + + /** + * @generated from enum value: OPERATION_GET_ACTION_ATTEMPT_METRICS = 7; + */ + GET_ACTION_ATTEMPT_METRICS = 7, +} + +/** + * Describes the enum flyteidl2.cluster.SelectClusterRequest.Operation. + */ +export const SelectClusterRequest_OperationSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_flyteidl2_cluster_payload, 0, 0); + +/** + * @generated from message flyteidl2.cluster.SelectClusterResponse + */ +export type SelectClusterResponse = Message<"flyteidl2.cluster.SelectClusterResponse"> & { + /** + * @generated from field: string cluster_endpoint = 1; + */ + clusterEndpoint: string; +}; + +/** + * Describes the message flyteidl2.cluster.SelectClusterResponse. + * Use `create(SelectClusterResponseSchema)` to create a new message. + */ +export const SelectClusterResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_flyteidl2_cluster_payload, 1); + diff --git a/gen/ts/flyteidl2/cluster/service_pb.ts b/gen/ts/flyteidl2/cluster/service_pb.ts new file mode 100644 index 0000000000..605470c42a --- /dev/null +++ b/gen/ts/flyteidl2/cluster/service_pb.ts @@ -0,0 +1,31 @@ +// @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.ts" +// @generated from file flyteidl2/cluster/service.proto (package flyteidl2.cluster, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { SelectClusterRequestSchema, SelectClusterResponseSchema } from "./payload_pb.ts"; +import { file_flyteidl2_cluster_payload } from "./payload_pb.ts"; +import { file_google_api_annotations } from "../../google/api/annotations_pb.ts"; + +/** + * Describes the file flyteidl2/cluster/service.proto. + */ +export const file_flyteidl2_cluster_service: GenFile = /*@__PURE__*/ + fileDesc("Ch9mbHl0ZWlkbDIvY2x1c3Rlci9zZXJ2aWNlLnByb3RvEhFmbHl0ZWlkbDIuY2x1c3RlcjJ2Cg5DbHVzdGVyU2VydmljZRJkCg1TZWxlY3RDbHVzdGVyEicuZmx5dGVpZGwyLmNsdXN0ZXIuU2VsZWN0Q2x1c3RlclJlcXVlc3QaKC5mbHl0ZWlkbDIuY2x1c3Rlci5TZWxlY3RDbHVzdGVyUmVzcG9uc2UiAELDAQoVY29tLmZseXRlaWRsMi5jbHVzdGVyQgxTZXJ2aWNlUHJvdG9IAlABWjVnaXRodWIuY29tL2ZseXRlb3JnL2ZseXRlL3YyL2dlbi9nby9mbHl0ZWlkbDIvY2x1c3RlcqICA0ZDWKoCEUZseXRlaWRsMi5DbHVzdGVyygIRRmx5dGVpZGwyXENsdXN0ZXLiAh1GbHl0ZWlkbDJcQ2x1c3RlclxHUEJNZXRhZGF0YeoCEkZseXRlaWRsMjo6Q2x1c3RlcmIGcHJvdG8z", [file_flyteidl2_cluster_payload, file_google_api_annotations]); + +/** + * @generated from service flyteidl2.cluster.ClusterService + */ +export const ClusterService: GenService<{ + /** + * @generated from rpc flyteidl2.cluster.ClusterService.SelectCluster + */ + selectCluster: { + methodKind: "unary"; + input: typeof SelectClusterRequestSchema; + output: typeof SelectClusterResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_flyteidl2_cluster_service, 0); +