refactor: re-generate go grpc protobuf (#271)
Signed-off-by: liyang <daviderli614@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
.PHONY: all rust go go-deps java
|
.PHONY: all rust go go-deps java
|
||||||
|
|
||||||
BUILDER_CONTAINER=namely/protoc-all:1.51_1
|
BUILDER_CONTAINER=namely/protoc-all:1.51_2
|
||||||
|
|
||||||
all: rust go java cpp
|
all: rust go java cpp
|
||||||
|
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// - protoc-gen-go-grpc v1.2.0
|
|
||||||
// - protoc v3.21.6
|
|
||||||
// source: greptime/v1/meta/ddl.proto
|
|
||||||
|
|
||||||
package meta
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
// DdlTaskClient is the client API for DdlTask 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 DdlTaskClient interface {
|
|
||||||
// Submits a DDL task to meta.
|
|
||||||
SubmitDdlTask(ctx context.Context, in *SubmitDdlTaskRequest, opts ...grpc.CallOption) (*SubmitDdlTaskResponse, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type ddlTaskClient struct {
|
|
||||||
cc grpc.ClientConnInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewDdlTaskClient(cc grpc.ClientConnInterface) DdlTaskClient {
|
|
||||||
return &ddlTaskClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ddlTaskClient) SubmitDdlTask(ctx context.Context, in *SubmitDdlTaskRequest, opts ...grpc.CallOption) (*SubmitDdlTaskResponse, error) {
|
|
||||||
out := new(SubmitDdlTaskResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.DdlTask/SubmitDdlTask", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DdlTaskServer is the server API for DdlTask service.
|
|
||||||
// All implementations must embed UnimplementedDdlTaskServer
|
|
||||||
// for forward compatibility
|
|
||||||
type DdlTaskServer interface {
|
|
||||||
// Submits a DDL task to meta.
|
|
||||||
SubmitDdlTask(context.Context, *SubmitDdlTaskRequest) (*SubmitDdlTaskResponse, error)
|
|
||||||
mustEmbedUnimplementedDdlTaskServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedDdlTaskServer must be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedDdlTaskServer struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedDdlTaskServer) SubmitDdlTask(context.Context, *SubmitDdlTaskRequest) (*SubmitDdlTaskResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method SubmitDdlTask not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedDdlTaskServer) mustEmbedUnimplementedDdlTaskServer() {}
|
|
||||||
|
|
||||||
// UnsafeDdlTaskServer may be embedded to opt out of forward compatibility for this service.
|
|
||||||
// Use of this interface is not recommended, as added methods to DdlTaskServer will
|
|
||||||
// result in compilation errors.
|
|
||||||
type UnsafeDdlTaskServer interface {
|
|
||||||
mustEmbedUnimplementedDdlTaskServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterDdlTaskServer(s grpc.ServiceRegistrar, srv DdlTaskServer) {
|
|
||||||
s.RegisterService(&DdlTask_ServiceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _DdlTask_SubmitDdlTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(SubmitDdlTaskRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(DdlTaskServer).SubmitDdlTask(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/greptime.v1.meta.DdlTask/SubmitDdlTask",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(DdlTaskServer).SubmitDdlTask(ctx, req.(*SubmitDdlTaskRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// DdlTask_ServiceDesc is the grpc.ServiceDesc for DdlTask service.
|
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
|
||||||
// and not to be introspected or modified (even as a copy)
|
|
||||||
var DdlTask_ServiceDesc = grpc.ServiceDesc{
|
|
||||||
ServiceName: "greptime.v1.meta.DdlTask",
|
|
||||||
HandlerType: (*DdlTaskServer)(nil),
|
|
||||||
Methods: []grpc.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "SubmitDdlTask",
|
|
||||||
Handler: _DdlTask_SubmitDdlTask_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc.StreamDesc{},
|
|
||||||
Metadata: "greptime/v1/meta/ddl.proto",
|
|
||||||
}
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// - protoc-gen-go-grpc v1.2.0
|
|
||||||
// - protoc v3.21.6
|
|
||||||
// source: greptime/v1/meta/route.proto
|
|
||||||
|
|
||||||
package meta
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
// RouterClient is the client API for Router 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 RouterClient interface {
|
|
||||||
// Fetch routing information for tables. The smallest unit is the complete
|
|
||||||
// routing information(all regions) of a table.
|
|
||||||
//
|
|
||||||
// ```text
|
|
||||||
// table_1
|
|
||||||
//
|
|
||||||
// table_name
|
|
||||||
// table_schema
|
|
||||||
// regions
|
|
||||||
// region_1
|
|
||||||
// leader_peer
|
|
||||||
// follower_peer_1, follower_peer_2
|
|
||||||
// region_2
|
|
||||||
// leader_peer
|
|
||||||
// follower_peer_1, follower_peer_2, follower_peer_3
|
|
||||||
// region_xxx
|
|
||||||
//
|
|
||||||
// table_2
|
|
||||||
//
|
|
||||||
// ...
|
|
||||||
//
|
|
||||||
// ```
|
|
||||||
Route(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteResponse, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type routerClient struct {
|
|
||||||
cc grpc.ClientConnInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewRouterClient(cc grpc.ClientConnInterface) RouterClient {
|
|
||||||
return &routerClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *routerClient) Route(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteResponse, error) {
|
|
||||||
out := new(RouteResponse)
|
|
||||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Route", in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// RouterServer is the server API for Router service.
|
|
||||||
// All implementations must embed UnimplementedRouterServer
|
|
||||||
// for forward compatibility
|
|
||||||
type RouterServer interface {
|
|
||||||
// Fetch routing information for tables. The smallest unit is the complete
|
|
||||||
// routing information(all regions) of a table.
|
|
||||||
//
|
|
||||||
// ```text
|
|
||||||
// table_1
|
|
||||||
//
|
|
||||||
// table_name
|
|
||||||
// table_schema
|
|
||||||
// regions
|
|
||||||
// region_1
|
|
||||||
// leader_peer
|
|
||||||
// follower_peer_1, follower_peer_2
|
|
||||||
// region_2
|
|
||||||
// leader_peer
|
|
||||||
// follower_peer_1, follower_peer_2, follower_peer_3
|
|
||||||
// region_xxx
|
|
||||||
//
|
|
||||||
// table_2
|
|
||||||
//
|
|
||||||
// ...
|
|
||||||
//
|
|
||||||
// ```
|
|
||||||
Route(context.Context, *RouteRequest) (*RouteResponse, error)
|
|
||||||
mustEmbedUnimplementedRouterServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedRouterServer must be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedRouterServer struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedRouterServer) Route(context.Context, *RouteRequest) (*RouteResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Route not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedRouterServer) mustEmbedUnimplementedRouterServer() {}
|
|
||||||
|
|
||||||
// UnsafeRouterServer may be embedded to opt out of forward compatibility for this service.
|
|
||||||
// Use of this interface is not recommended, as added methods to RouterServer will
|
|
||||||
// result in compilation errors.
|
|
||||||
type UnsafeRouterServer interface {
|
|
||||||
mustEmbedUnimplementedRouterServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer) {
|
|
||||||
s.RegisterService(&Router_ServiceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Router_Route_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(RouteRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(RouterServer).Route(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: "/greptime.v1.meta.Router/Route",
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(RouterServer).Route(ctx, req.(*RouteRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Router_ServiceDesc is the grpc.ServiceDesc for Router service.
|
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
|
||||||
// and not to be introspected or modified (even as a copy)
|
|
||||||
var Router_ServiceDesc = grpc.ServiceDesc{
|
|
||||||
ServiceName: "greptime.v1.meta.Router",
|
|
||||||
HandlerType: (*RouterServer)(nil),
|
|
||||||
Methods: []grpc.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "Route",
|
|
||||||
Handler: _Router_Route_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc.StreamDesc{},
|
|
||||||
Metadata: "greptime/v1/meta/route.proto",
|
|
||||||
}
|
|
||||||
@@ -6,4 +6,7 @@ PROTO_ROOT=./proto
|
|||||||
GO_OUTPUT=./go
|
GO_OUTPUT=./go
|
||||||
|
|
||||||
protoc -I=${PROTO_ROOT} --go_out=paths=source_relative:${GO_OUTPUT} $(find ./proto/ -type f -iname "*.proto")
|
protoc -I=${PROTO_ROOT} --go_out=paths=source_relative:${GO_OUTPUT} $(find ./proto/ -type f -iname "*.proto")
|
||||||
|
protoc -I=${PROTO_ROOT} \
|
||||||
|
--go-grpc_out=paths=source_relative:${GO_OUTPUT} \
|
||||||
|
$(find ./proto/ -type f -iname "*.proto")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user