diff --git a/cmd/manager/v1alpha1/main.go b/cmd/manager/v1alpha1/main.go index c0c6ee73ef3..f63d707e15a 100644 --- a/cmd/manager/v1alpha1/main.go +++ b/cmd/manager/v1alpha1/main.go @@ -10,7 +10,7 @@ import ( "time" api_pb "github.com/kubeflow/katib/pkg/api/v1alpha1" - health_pb "github.com/kubeflow/katib/pkg/api/v1alpha1/health" + health_pb "github.com/kubeflow/katib/pkg/api/health" kdb "github.com/kubeflow/katib/pkg/db/v1alpha1" "github.com/kubeflow/katib/pkg/manager/modelstore" diff --git a/cmd/manager/v1alpha2/main.go b/cmd/manager/v1alpha2/main.go index d4bf6dd51a1..156251358f2 100644 --- a/cmd/manager/v1alpha2/main.go +++ b/cmd/manager/v1alpha2/main.go @@ -9,7 +9,7 @@ import ( "net" api_pb "github.com/kubeflow/katib/pkg/api/v1alpha2" - health_pb "github.com/kubeflow/katib/pkg/api/v1alpha2/health" + health_pb "github.com/kubeflow/katib/pkg/api/health" kdb "github.com/kubeflow/katib/pkg/db/v1alpha2" "google.golang.org/grpc" diff --git a/pkg/api/health/Makefile b/pkg/api/health/Makefile new file mode 100644 index 00000000000..42170b0a412 --- /dev/null +++ b/pkg/api/health/Makefile @@ -0,0 +1,2 @@ +health.pb.go: health/health.proto + protoc -I. health/health.proto --go_out=plugins=grpc:. diff --git a/pkg/api/health/build.sh b/pkg/api/health/build.sh new file mode 100755 index 00000000000..489913909bc --- /dev/null +++ b/pkg/api/health/build.sh @@ -0,0 +1,7 @@ +set -x +set -e +proto="health.proto" +docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --python_out=plugins=grpc:./python --go_out=plugins=grpc:. -I. $proto +docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --plugin=protoc-gen-grpc=/usr/bin/grpc_python_plugin --python_out=./python --grpc_out=./python -I. $proto +docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --grpc-gateway_out=logtostderr=true:. -I. $proto +docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --swagger_out=logtostderr=true:. -I. $proto diff --git a/pkg/api/v1alpha1/health/health.pb.go b/pkg/api/health/health.pb.go similarity index 79% rename from pkg/api/v1alpha1/health/health.pb.go rename to pkg/api/health/health.pb.go index 342a9f57f2c..1f598c1ea49 100644 --- a/pkg/api/v1alpha1/health/health.pb.go +++ b/pkg/api/health/health.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: health/health.proto +// source: health.proto /* Package grpc_health_v1 is a generated protocol buffer package. It is generated from these files: - health/health.proto + health.proto It has these top-level messages: HealthCheckRequest @@ -166,24 +166,24 @@ var _Health_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "health/health.proto", + Metadata: "health.proto", } -func init() { proto.RegisterFile("health/health.proto", fileDescriptor0) } +func init() { proto.RegisterFile("health.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 207 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0x48, 0x4d, 0xcc, - 0x29, 0xc9, 0xd0, 0x87, 0x50, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x7c, 0xe9, 0x45, 0x05, - 0xc9, 0x7a, 0x50, 0xa1, 0x32, 0x43, 0x25, 0x3d, 0x2e, 0x21, 0x0f, 0x30, 0xc7, 0x39, 0x23, 0x35, - 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82, 0x8b, 0xbd, 0x38, 0xb5, 0xa8, - 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x55, 0x9a, 0xc3, 0xc8, - 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, 0x93, 0x8b, 0xad, 0xb8, 0x24, - 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x50, 0x0f, 0xd5, 0x22, 0x3d, 0x2c, 0x9a, 0xf4, - 0x82, 0x41, 0x86, 0xe6, 0xa5, 0x07, 0x83, 0x35, 0x06, 0x41, 0x0d, 0x50, 0xb2, 0xe2, 0xe2, 0x45, - 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f, 0xf7, 0x13, 0x60, 0x00, 0x71, - 0x82, 0x5d, 0x83, 0xc2, 0x3c, 0xfd, 0xdc, 0x05, 0x18, 0x85, 0xf8, 0xb9, 0xb8, 0xfd, 0xfc, 0x43, - 0xe2, 0x61, 0x02, 0x4c, 0x46, 0x51, 0x5c, 0x6c, 0x10, 0x8b, 0x84, 0x02, 0xb8, 0x58, 0xc1, 0x96, - 0x09, 0x29, 0xe1, 0x75, 0x09, 0xd8, 0xbf, 0x52, 0xca, 0x44, 0xb8, 0x36, 0x89, 0x0d, 0x1c, 0x82, - 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x1d, 0x77, 0xe9, 0x58, 0x01, 0x00, 0x00, + // 204 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc9, 0x48, 0x4d, 0xcc, + 0x29, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4b, 0x2f, 0x2a, 0x48, 0xd6, 0x83, + 0x0a, 0x95, 0x19, 0x2a, 0xe9, 0x71, 0x09, 0x79, 0x80, 0x39, 0xce, 0x19, 0xa9, 0xc9, 0xd9, 0x41, + 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0x45, 0x65, 0x99, 0xc9, + 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x30, 0xae, 0xd2, 0x1c, 0x46, 0x2e, 0x61, 0x14, + 0x0d, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x42, 0x9e, 0x5c, 0x6c, 0xc5, 0x25, 0x89, 0x25, 0xa5, + 0xc5, 0x60, 0x0d, 0x7c, 0x46, 0x86, 0x7a, 0xa8, 0x16, 0xe9, 0x61, 0xd1, 0xa4, 0x17, 0x0c, 0x32, + 0x34, 0x2f, 0x3d, 0x18, 0xac, 0x31, 0x08, 0x6a, 0x80, 0x92, 0x15, 0x17, 0x2f, 0x8a, 0x84, 0x10, + 0x37, 0x17, 0x7b, 0xa8, 0x9f, 0xb7, 0x9f, 0x7f, 0xb8, 0x9f, 0x00, 0x03, 0x88, 0x13, 0xec, 0x1a, + 0x14, 0xe6, 0xe9, 0xe7, 0x2e, 0xc0, 0x28, 0xc4, 0xcf, 0xc5, 0xed, 0xe7, 0x1f, 0x12, 0x0f, 0x13, + 0x60, 0x32, 0x8a, 0xe2, 0x62, 0x83, 0x58, 0x24, 0x14, 0xc0, 0xc5, 0x0a, 0xb6, 0x4c, 0x48, 0x09, + 0xaf, 0x4b, 0xc0, 0xfe, 0x95, 0x52, 0x26, 0xc2, 0xb5, 0x49, 0x6c, 0xe0, 0x10, 0x34, 0x06, 0x04, + 0x00, 0x00, 0xff, 0xff, 0xac, 0x56, 0x2a, 0xcb, 0x51, 0x01, 0x00, 0x00, } diff --git a/pkg/api/v1alpha1/health/health.proto b/pkg/api/health/health.proto similarity index 100% rename from pkg/api/v1alpha1/health/health.proto rename to pkg/api/health/health.proto diff --git a/pkg/api/v1alpha1/health/health.swagger.json b/pkg/api/health/health.swagger.json similarity index 94% rename from pkg/api/v1alpha1/health/health.swagger.json rename to pkg/api/health/health.swagger.json index 9619519fbe9..6b219516a4a 100644 --- a/pkg/api/v1alpha1/health/health.swagger.json +++ b/pkg/api/health/health.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "health/health.proto", + "title": "health.proto", "version": "version not set" }, "schemes": [ diff --git a/pkg/api/v1alpha1/python/health/health_pb2.py b/pkg/api/health/python/health_pb2.py similarity index 91% rename from pkg/api/v1alpha1/python/health/health_pb2.py rename to pkg/api/health/python/health_pb2.py index be2ab95f31a..ef49555776d 100644 --- a/pkg/api/v1alpha1/python/health/health_pb2.py +++ b/pkg/api/health/python/health_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: health/health.proto +# source: health.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -16,10 +16,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='health/health.proto', + name='health.proto', package='grpc.health.v1', syntax='proto3', - serialized_pb=_b('\n\x13health/health.proto\x12\x0egrpc.health.v1\"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\"\x94\x01\n\x13HealthCheckResponse\x12\x41\n\x06status\x18\x01 \x01(\x0e\x32\x31.grpc.health.v1.HealthCheckResponse.ServingStatus\":\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x32Z\n\x06Health\x12P\n\x05\x43heck\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponseb\x06proto3') + serialized_pb=_b('\n\x0chealth.proto\x12\x0egrpc.health.v1\"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\"\x94\x01\n\x13HealthCheckResponse\x12\x41\n\x06status\x18\x01 \x01(\x0e\x32\x31.grpc.health.v1.HealthCheckResponse.ServingStatus\":\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x32Z\n\x06Health\x12P\n\x05\x43heck\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponseb\x06proto3') ) @@ -45,8 +45,8 @@ ], containing_type=None, options=None, - serialized_start=169, - serialized_end=227, + serialized_start=162, + serialized_end=220, ) _sym_db.RegisterEnumDescriptor(_HEALTHCHECKRESPONSE_SERVINGSTATUS) @@ -77,8 +77,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39, - serialized_end=76, + serialized_start=32, + serialized_end=69, ) @@ -109,8 +109,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=79, - serialized_end=227, + serialized_start=72, + serialized_end=220, ) _HEALTHCHECKRESPONSE.fields_by_name['status'].enum_type = _HEALTHCHECKRESPONSE_SERVINGSTATUS @@ -121,14 +121,14 @@ HealthCheckRequest = _reflection.GeneratedProtocolMessageType('HealthCheckRequest', (_message.Message,), dict( DESCRIPTOR = _HEALTHCHECKREQUEST, - __module__ = 'health.health_pb2' + __module__ = 'health_pb2' # @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckRequest) )) _sym_db.RegisterMessage(HealthCheckRequest) HealthCheckResponse = _reflection.GeneratedProtocolMessageType('HealthCheckResponse', (_message.Message,), dict( DESCRIPTOR = _HEALTHCHECKRESPONSE, - __module__ = 'health.health_pb2' + __module__ = 'health_pb2' # @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckResponse) )) _sym_db.RegisterMessage(HealthCheckResponse) @@ -141,8 +141,8 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=229, - serialized_end=319, + serialized_start=222, + serialized_end=312, methods=[ _descriptor.MethodDescriptor( name='Check', diff --git a/pkg/api/v1alpha1/python/health/health_pb2_grpc.py b/pkg/api/health/python/health_pb2_grpc.py similarity index 72% rename from pkg/api/v1alpha1/python/health/health_pb2_grpc.py rename to pkg/api/health/python/health_pb2_grpc.py index 8ca4614e3e5..cdaeac5ffe2 100644 --- a/pkg/api/v1alpha1/python/health/health_pb2_grpc.py +++ b/pkg/api/health/python/health_pb2_grpc.py @@ -1,7 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from health import health_pb2 as health_dot_health__pb2 +import health_pb2 as health__pb2 class HealthStub(object): @@ -16,8 +16,8 @@ def __init__(self, channel): """ self.Check = channel.unary_unary( '/grpc.health.v1.Health/Check', - request_serializer=health_dot_health__pb2.HealthCheckRequest.SerializeToString, - response_deserializer=health_dot_health__pb2.HealthCheckResponse.FromString, + request_serializer=health__pb2.HealthCheckRequest.SerializeToString, + response_deserializer=health__pb2.HealthCheckResponse.FromString, ) @@ -37,8 +37,8 @@ def add_HealthServicer_to_server(servicer, server): rpc_method_handlers = { 'Check': grpc.unary_unary_rpc_method_handler( servicer.Check, - request_deserializer=health_dot_health__pb2.HealthCheckRequest.FromString, - response_serializer=health_dot_health__pb2.HealthCheckResponse.SerializeToString, + request_deserializer=health__pb2.HealthCheckRequest.FromString, + response_serializer=health__pb2.HealthCheckResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( diff --git a/pkg/api/v1alpha1/Makefile b/pkg/api/v1alpha1/Makefile index 8824c274827..f63e1d5a8f4 100644 --- a/pkg/api/v1alpha1/Makefile +++ b/pkg/api/v1alpha1/Makefile @@ -1,4 +1,2 @@ api.pb.go: api.proto protoc -I. api.proto --go_out=plugins=grpc:. -health.pb.go: health/health.proto - protoc -I. health/health.proto --go_out=plugins=grpc:. diff --git a/pkg/api/v1alpha1/build.sh b/pkg/api/v1alpha1/build.sh index 0770a2ec50d..74a1f5b2a18 100755 --- a/pkg/api/v1alpha1/build.sh +++ b/pkg/api/v1alpha1/build.sh @@ -1,6 +1,6 @@ set -x set -e -for proto in api.proto health/health.proto; do +for proto in api.proto; do docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --python_out=plugins=grpc:./python --go_out=plugins=grpc:. -I. $proto docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --plugin=protoc-gen-grpc=/usr/bin/grpc_python_plugin --python_out=./python --grpc_out=./python -I. $proto docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --grpc-gateway_out=logtostderr=true:. -I. $proto diff --git a/pkg/api/v1alpha2/Makefile b/pkg/api/v1alpha2/Makefile index 8824c274827..f63e1d5a8f4 100644 --- a/pkg/api/v1alpha2/Makefile +++ b/pkg/api/v1alpha2/Makefile @@ -1,4 +1,2 @@ api.pb.go: api.proto protoc -I. api.proto --go_out=plugins=grpc:. -health.pb.go: health/health.proto - protoc -I. health/health.proto --go_out=plugins=grpc:. diff --git a/pkg/api/v1alpha2/build.sh b/pkg/api/v1alpha2/build.sh index 0770a2ec50d..74a1f5b2a18 100755 --- a/pkg/api/v1alpha2/build.sh +++ b/pkg/api/v1alpha2/build.sh @@ -1,6 +1,6 @@ set -x set -e -for proto in api.proto health/health.proto; do +for proto in api.proto; do docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --python_out=plugins=grpc:./python --go_out=plugins=grpc:. -I. $proto docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --plugin=protoc-gen-grpc=/usr/bin/grpc_python_plugin --python_out=./python --grpc_out=./python -I. $proto docker run -it --rm -v $PWD:$(pwd) -w $(pwd) znly/protoc --grpc-gateway_out=logtostderr=true:. -I. $proto diff --git a/pkg/api/v1alpha2/health/health.pb.go b/pkg/api/v1alpha2/health/health.pb.go deleted file mode 100644 index d9c64fe0cdc..00000000000 --- a/pkg/api/v1alpha2/health/health.pb.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: health/health.proto - -/* -Package grpc_health_v2 is a generated protocol buffer package. - -It is generated from these files: - health/health.proto - -It has these top-level messages: - HealthCheckRequest - HealthCheckResponse -*/ -package grpc_health_v2 - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type HealthCheckResponse_ServingStatus int32 - -const ( - HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 - HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 - HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 -) - -var HealthCheckResponse_ServingStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "SERVING", - 2: "NOT_SERVING", -} -var HealthCheckResponse_ServingStatus_value = map[string]int32{ - "UNKNOWN": 0, - "SERVING": 1, - "NOT_SERVING": 2, -} - -func (x HealthCheckResponse_ServingStatus) String() string { - return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x)) -} -func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{1, 0} -} - -type HealthCheckRequest struct { - Service string `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"` -} - -func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} } -func (m *HealthCheckRequest) String() string { return proto.CompactTextString(m) } -func (*HealthCheckRequest) ProtoMessage() {} -func (*HealthCheckRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *HealthCheckRequest) GetService() string { - if m != nil { - return m.Service - } - return "" -} - -type HealthCheckResponse struct { - Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,enum=grpc.health.v2.HealthCheckResponse_ServingStatus" json:"status,omitempty"` -} - -func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } -func (m *HealthCheckResponse) String() string { return proto.CompactTextString(m) } -func (*HealthCheckResponse) ProtoMessage() {} -func (*HealthCheckResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus { - if m != nil { - return m.Status - } - return HealthCheckResponse_UNKNOWN -} - -func init() { - proto.RegisterType((*HealthCheckRequest)(nil), "grpc.health.v2.HealthCheckRequest") - proto.RegisterType((*HealthCheckResponse)(nil), "grpc.health.v2.HealthCheckResponse") - proto.RegisterEnum("grpc.health.v2.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// Client API for Health service - -type HealthClient interface { - Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) -} - -type healthClient struct { - cc *grpc.ClientConn -} - -func NewHealthClient(cc *grpc.ClientConn) HealthClient { - return &healthClient{cc} -} - -func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) { - out := new(HealthCheckResponse) - err := grpc.Invoke(ctx, "/grpc.health.v2.Health/Check", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Health service - -type HealthServer interface { - Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) -} - -func RegisterHealthServer(s *grpc.Server, srv HealthServer) { - s.RegisterService(&_Health_serviceDesc, srv) -} - -func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HealthCheckRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HealthServer).Check(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.health.v2.Health/Check", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Health_serviceDesc = grpc.ServiceDesc{ - ServiceName: "grpc.health.v2.Health", - HandlerType: (*HealthServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Check", - Handler: _Health_Check_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "health/health.proto", -} - -func init() { proto.RegisterFile("health/health.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 207 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0x48, 0x4d, 0xcc, - 0x29, 0xc9, 0xd0, 0x87, 0x50, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x7c, 0xe9, 0x45, 0x05, - 0xc9, 0x7a, 0x50, 0xa1, 0x32, 0x23, 0x25, 0x3d, 0x2e, 0x21, 0x0f, 0x30, 0xc7, 0x39, 0x23, 0x35, - 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82, 0x8b, 0xbd, 0x38, 0xb5, 0xa8, - 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x55, 0x9a, 0xc3, 0xc8, - 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, 0x93, 0x8b, 0xad, 0xb8, 0x24, - 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x50, 0x0f, 0xd5, 0x22, 0x3d, 0x2c, 0x9a, 0xf4, - 0x82, 0x41, 0x86, 0xe6, 0xa5, 0x07, 0x83, 0x35, 0x06, 0x41, 0x0d, 0x50, 0xb2, 0xe2, 0xe2, 0x45, - 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f, 0xf7, 0x13, 0x60, 0x00, 0x71, - 0x82, 0x5d, 0x83, 0xc2, 0x3c, 0xfd, 0xdc, 0x05, 0x18, 0x85, 0xf8, 0xb9, 0xb8, 0xfd, 0xfc, 0x43, - 0xe2, 0x61, 0x02, 0x4c, 0x46, 0x51, 0x5c, 0x6c, 0x10, 0x8b, 0x84, 0x02, 0xb8, 0x58, 0xc1, 0x96, - 0x09, 0x29, 0xe1, 0x75, 0x09, 0xd8, 0xbf, 0x52, 0xca, 0x44, 0xb8, 0x36, 0x89, 0x0d, 0x1c, 0x82, - 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x24, 0x56, 0x73, 0x58, 0x01, 0x00, 0x00, -} diff --git a/pkg/api/v1alpha2/health/health.proto b/pkg/api/v1alpha2/health/health.proto deleted file mode 100644 index 0cacb4385cc..00000000000 --- a/pkg/api/v1alpha2/health/health.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package grpc.health.v2; - -service Health { - rpc Check(HealthCheckRequest) returns (HealthCheckResponse); -} - -message HealthCheckRequest { - string service = 1; -} - -message HealthCheckResponse { - enum ServingStatus { - UNKNOWN = 0; - SERVING = 1; - NOT_SERVING = 2; - } - ServingStatus status = 1; -} diff --git a/pkg/api/v1alpha2/health/health.swagger.json b/pkg/api/v1alpha2/health/health.swagger.json deleted file mode 100644 index ab559b18ead..00000000000 --- a/pkg/api/v1alpha2/health/health.swagger.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "health/health.proto", - "version": "version not set" - }, - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "HealthCheckResponseServingStatus": { - "type": "string", - "enum": [ - "UNKNOWN", - "SERVING", - "NOT_SERVING" - ], - "default": "UNKNOWN" - }, - "v2HealthCheckResponse": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/HealthCheckResponseServingStatus" - } - } - } - } -} diff --git a/pkg/api/v1alpha2/python/health/health_pb2.py b/pkg/api/v1alpha2/python/health/health_pb2.py deleted file mode 100644 index 1572148c3c7..00000000000 --- a/pkg/api/v1alpha2/python/health/health_pb2.py +++ /dev/null @@ -1,280 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: health/health.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='health/health.proto', - package='grpc.health.v2', - syntax='proto3', - serialized_pb=_b('\n\x13health/health.proto\x12\x0egrpc.health.v2\"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\"\x94\x01\n\x13HealthCheckResponse\x12\x41\n\x06status\x18\x01 \x01(\x0e\x32\x31.grpc.health.v2.HealthCheckResponse.ServingStatus\":\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x32Z\n\x06Health\x12P\n\x05\x43heck\x12\".grpc.health.v2.HealthCheckRequest\x1a#.grpc.health.v2.HealthCheckResponseb\x06proto3') -) - - - -_HEALTHCHECKRESPONSE_SERVINGSTATUS = _descriptor.EnumDescriptor( - name='ServingStatus', - full_name='grpc.health.v2.HealthCheckResponse.ServingStatus', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='UNKNOWN', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='SERVING', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NOT_SERVING', index=2, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=169, - serialized_end=227, -) -_sym_db.RegisterEnumDescriptor(_HEALTHCHECKRESPONSE_SERVINGSTATUS) - - -_HEALTHCHECKREQUEST = _descriptor.Descriptor( - name='HealthCheckRequest', - full_name='grpc.health.v2.HealthCheckRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='service', full_name='grpc.health.v2.HealthCheckRequest.service', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=39, - serialized_end=76, -) - - -_HEALTHCHECKRESPONSE = _descriptor.Descriptor( - name='HealthCheckResponse', - full_name='grpc.health.v2.HealthCheckResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='status', full_name='grpc.health.v2.HealthCheckResponse.status', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _HEALTHCHECKRESPONSE_SERVINGSTATUS, - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=79, - serialized_end=227, -) - -_HEALTHCHECKRESPONSE.fields_by_name['status'].enum_type = _HEALTHCHECKRESPONSE_SERVINGSTATUS -_HEALTHCHECKRESPONSE_SERVINGSTATUS.containing_type = _HEALTHCHECKRESPONSE -DESCRIPTOR.message_types_by_name['HealthCheckRequest'] = _HEALTHCHECKREQUEST -DESCRIPTOR.message_types_by_name['HealthCheckResponse'] = _HEALTHCHECKRESPONSE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -HealthCheckRequest = _reflection.GeneratedProtocolMessageType('HealthCheckRequest', (_message.Message,), dict( - DESCRIPTOR = _HEALTHCHECKREQUEST, - __module__ = 'health.health_pb2' - # @@protoc_insertion_point(class_scope:grpc.health.v2.HealthCheckRequest) - )) -_sym_db.RegisterMessage(HealthCheckRequest) - -HealthCheckResponse = _reflection.GeneratedProtocolMessageType('HealthCheckResponse', (_message.Message,), dict( - DESCRIPTOR = _HEALTHCHECKRESPONSE, - __module__ = 'health.health_pb2' - # @@protoc_insertion_point(class_scope:grpc.health.v2.HealthCheckResponse) - )) -_sym_db.RegisterMessage(HealthCheckResponse) - - - -_HEALTH = _descriptor.ServiceDescriptor( - name='Health', - full_name='grpc.health.v2.Health', - file=DESCRIPTOR, - index=0, - options=None, - serialized_start=229, - serialized_end=319, - methods=[ - _descriptor.MethodDescriptor( - name='Check', - full_name='grpc.health.v2.Health.Check', - index=0, - containing_service=None, - input_type=_HEALTHCHECKREQUEST, - output_type=_HEALTHCHECKRESPONSE, - options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_HEALTH) - -DESCRIPTOR.services_by_name['Health'] = _HEALTH - -try: - # THESE ELEMENTS WILL BE DEPRECATED. - # Please use the generated *_pb2_grpc.py files instead. - import grpc - from grpc.beta import implementations as beta_implementations - from grpc.beta import interfaces as beta_interfaces - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities - - - class HealthStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.Check = channel.unary_unary( - '/grpc.health.v2.Health/Check', - request_serializer=HealthCheckRequest.SerializeToString, - response_deserializer=HealthCheckResponse.FromString, - ) - - - class HealthServicer(object): - # missing associated documentation comment in .proto file - pass - - def Check(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - - def add_HealthServicer_to_server(servicer, server): - rpc_method_handlers = { - 'Check': grpc.unary_unary_rpc_method_handler( - servicer.Check, - request_deserializer=HealthCheckRequest.FromString, - response_serializer=HealthCheckResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'grpc.health.v2.Health', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - class BetaHealthServicer(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - # missing associated documentation comment in .proto file - pass - def Check(self, request, context): - # missing associated documentation comment in .proto file - pass - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - - - class BetaHealthStub(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - # missing associated documentation comment in .proto file - pass - def Check(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - # missing associated documentation comment in .proto file - pass - raise NotImplementedError() - Check.future = None - - - def beta_create_Health_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_deserializers = { - ('grpc.health.v2.Health', 'Check'): HealthCheckRequest.FromString, - } - response_serializers = { - ('grpc.health.v2.Health', 'Check'): HealthCheckResponse.SerializeToString, - } - method_implementations = { - ('grpc.health.v2.Health', 'Check'): face_utilities.unary_unary_inline(servicer.Check), - } - server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) - return beta_implementations.server(method_implementations, options=server_options) - - - def beta_create_Health_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_serializers = { - ('grpc.health.v2.Health', 'Check'): HealthCheckRequest.SerializeToString, - } - response_deserializers = { - ('grpc.health.v2.Health', 'Check'): HealthCheckResponse.FromString, - } - cardinalities = { - 'Check': cardinality.Cardinality.UNARY_UNARY, - } - stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) - return beta_implementations.dynamic_stub(channel, 'grpc.health.v2.Health', cardinalities, options=stub_options) -except ImportError: - pass -# @@protoc_insertion_point(module_scope) diff --git a/pkg/api/v1alpha2/python/health/health_pb2_grpc.py b/pkg/api/v1alpha2/python/health/health_pb2_grpc.py deleted file mode 100644 index 2b19233834d..00000000000 --- a/pkg/api/v1alpha2/python/health/health_pb2_grpc.py +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -from health import health_pb2 as health_dot_health__pb2 - - -class HealthStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.Check = channel.unary_unary( - '/grpc.health.v2.Health/Check', - request_serializer=health_dot_health__pb2.HealthCheckRequest.SerializeToString, - response_deserializer=health_dot_health__pb2.HealthCheckResponse.FromString, - ) - - -class HealthServicer(object): - # missing associated documentation comment in .proto file - pass - - def Check(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_HealthServicer_to_server(servicer, server): - rpc_method_handlers = { - 'Check': grpc.unary_unary_rpc_method_handler( - servicer.Check, - request_deserializer=health_dot_health__pb2.HealthCheckRequest.FromString, - response_serializer=health_dot_health__pb2.HealthCheckResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'grpc.health.v2.Health', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,))