mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
fix: unable to sync directories to work nodes
This commit is contained in:
24
grpc/bin/compile.sh
Executable file → Normal file
24
grpc/bin/compile.sh
Executable file → Normal file
@@ -8,30 +8,8 @@ else
|
||||
fi
|
||||
base_path=$(cd $BASE_DIR/..; pwd)
|
||||
|
||||
cd $base_path && \
|
||||
rm -rf dist | true
|
||||
|
||||
cd $base_path && \
|
||||
mkdir -p dist/python | true && \
|
||||
mkdir -p dist/js | true && \
|
||||
mkdir -p dist/ts | true && \
|
||||
mkdir -p dist/java | true && \
|
||||
mkdir -p dist/csharp | true && \
|
||||
mkdir -p dist/php | true && \
|
||||
mkdir -p dist/ruby | true
|
||||
|
||||
cd $base_path && \
|
||||
protoc -I ./proto \
|
||||
--go_out=. \
|
||||
--go-grpc_out=. \
|
||||
--python_out=dist/python \
|
||||
--js_out=dist/js \
|
||||
--java_out=dist/java \
|
||||
--csharp_out=dist/csharp \
|
||||
./proto/**/*.proto
|
||||
|
||||
# python
|
||||
cd $base_path && \
|
||||
python3 -m grpc_tools.protoc -I ./proto \
|
||||
--grpc_python_out=dist/python \
|
||||
./proto/**/*.proto
|
||||
./proto/**/*.proto
|
||||
37
grpc/bin/compile_all.sh
Normal file
37
grpc/bin/compile_all.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -L $0 ]
|
||||
then
|
||||
BASE_DIR=`dirname $(readlink $0)`
|
||||
else
|
||||
BASE_DIR=`dirname $0`
|
||||
fi
|
||||
base_path=$(cd $BASE_DIR/..; pwd)
|
||||
|
||||
cd $base_path && \
|
||||
rm -rf dist | true
|
||||
|
||||
cd $base_path && \
|
||||
mkdir -p dist/python | true && \
|
||||
mkdir -p dist/js | true && \
|
||||
mkdir -p dist/ts | true && \
|
||||
mkdir -p dist/java | true && \
|
||||
mkdir -p dist/csharp | true && \
|
||||
mkdir -p dist/php | true && \
|
||||
mkdir -p dist/ruby | true
|
||||
|
||||
cd $base_path && \
|
||||
protoc -I ./proto \
|
||||
--go_out=. \
|
||||
--go-grpc_out=. \
|
||||
--python_out=dist/python \
|
||||
--js_out=dist/js \
|
||||
--java_out=dist/java \
|
||||
--csharp_out=dist/csharp \
|
||||
./proto/**/*.proto
|
||||
|
||||
# python
|
||||
cd $base_path && \
|
||||
python3 -m grpc_tools.protoc -I ./proto \
|
||||
--grpc_python_out=dist/python \
|
||||
./proto/**/*.proto
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/dependencies_service_v2.proto
|
||||
|
||||
@@ -15,8 +15,14 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
DependenciesServiceV2_Connect_FullMethodName = "/grpc.DependenciesServiceV2/Connect"
|
||||
DependenciesServiceV2_Sync_FullMethodName = "/grpc.DependenciesServiceV2/Sync"
|
||||
DependenciesServiceV2_UpdateTaskLog_FullMethodName = "/grpc.DependenciesServiceV2/UpdateTaskLog"
|
||||
)
|
||||
|
||||
// DependenciesServiceV2Client is the client API for DependenciesServiceV2 service.
|
||||
//
|
||||
@@ -36,11 +42,12 @@ func NewDependenciesServiceV2Client(cc grpc.ClientConnInterface) DependenciesSer
|
||||
}
|
||||
|
||||
func (c *dependenciesServiceV2Client) Connect(ctx context.Context, in *DependenciesServiceV2ConnectRequest, opts ...grpc.CallOption) (DependenciesServiceV2_ConnectClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[0], "/grpc.DependenciesServiceV2/Connect", opts...)
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[0], DependenciesServiceV2_Connect_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &dependenciesServiceV2ConnectClient{stream}
|
||||
x := &dependenciesServiceV2ConnectClient{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -68,8 +75,9 @@ func (x *dependenciesServiceV2ConnectClient) Recv() (*DependenciesServiceV2Conne
|
||||
}
|
||||
|
||||
func (c *dependenciesServiceV2Client) Sync(ctx context.Context, in *DependenciesServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.DependenciesServiceV2/Sync", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, DependenciesServiceV2_Sync_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -77,11 +85,12 @@ func (c *dependenciesServiceV2Client) Sync(ctx context.Context, in *Dependencies
|
||||
}
|
||||
|
||||
func (c *dependenciesServiceV2Client) UpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependenciesServiceV2_UpdateTaskLogClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[1], "/grpc.DependenciesServiceV2/UpdateTaskLog", opts...)
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[1], DependenciesServiceV2_UpdateTaskLog_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &dependenciesServiceV2UpdateTaskLogClient{stream}
|
||||
x := &dependenciesServiceV2UpdateTaskLogClient{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
@@ -151,7 +160,7 @@ func _DependenciesServiceV2_Connect_Handler(srv interface{}, stream grpc.ServerS
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(DependenciesServiceV2Server).Connect(m, &dependenciesServiceV2ConnectServer{stream})
|
||||
return srv.(DependenciesServiceV2Server).Connect(m, &dependenciesServiceV2ConnectServer{ServerStream: stream})
|
||||
}
|
||||
|
||||
type DependenciesServiceV2_ConnectServer interface {
|
||||
@@ -177,7 +186,7 @@ func _DependenciesServiceV2_Sync_Handler(srv interface{}, ctx context.Context, d
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.DependenciesServiceV2/Sync",
|
||||
FullMethod: DependenciesServiceV2_Sync_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DependenciesServiceV2Server).Sync(ctx, req.(*DependenciesServiceV2SyncRequest))
|
||||
@@ -186,7 +195,7 @@ func _DependenciesServiceV2_Sync_Handler(srv interface{}, ctx context.Context, d
|
||||
}
|
||||
|
||||
func _DependenciesServiceV2_UpdateTaskLog_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(DependenciesServiceV2Server).UpdateTaskLog(&dependenciesServiceV2UpdateTaskLogServer{stream})
|
||||
return srv.(DependenciesServiceV2Server).UpdateTaskLog(&dependenciesServiceV2UpdateTaskLogServer{ServerStream: stream})
|
||||
}
|
||||
|
||||
type DependenciesServiceV2_UpdateTaskLogServer interface {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/message_service.proto
|
||||
|
||||
@@ -15,8 +15,12 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
MessageService_Connect_FullMethodName = "/grpc.MessageService/Connect"
|
||||
)
|
||||
|
||||
// MessageServiceClient is the client API for MessageService service.
|
||||
//
|
||||
@@ -34,11 +38,12 @@ func NewMessageServiceClient(cc grpc.ClientConnInterface) MessageServiceClient {
|
||||
}
|
||||
|
||||
func (c *messageServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (MessageService_ConnectClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &MessageService_ServiceDesc.Streams[0], "/grpc.MessageService/Connect", opts...)
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &MessageService_ServiceDesc.Streams[0], MessageService_Connect_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &messageServiceConnectClient{stream}
|
||||
x := &messageServiceConnectClient{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
@@ -93,7 +98,7 @@ func RegisterMessageServiceServer(s grpc.ServiceRegistrar, srv MessageServiceSer
|
||||
}
|
||||
|
||||
func _MessageService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(MessageServiceServer).Connect(&messageServiceConnectServer{stream})
|
||||
return srv.(MessageServiceServer).Connect(&messageServiceConnectServer{ServerStream: stream})
|
||||
}
|
||||
|
||||
type MessageService_ConnectServer interface {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/metrics_service_v2.proto
|
||||
|
||||
@@ -15,8 +15,12 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
MetricsServiceV2_Connect_FullMethodName = "/grpc.MetricsServiceV2/Connect"
|
||||
)
|
||||
|
||||
// MetricsServiceV2Client is the client API for MetricsServiceV2 service.
|
||||
//
|
||||
@@ -34,11 +38,12 @@ func NewMetricsServiceV2Client(cc grpc.ClientConnInterface) MetricsServiceV2Clie
|
||||
}
|
||||
|
||||
func (c *metricsServiceV2Client) Connect(ctx context.Context, opts ...grpc.CallOption) (MetricsServiceV2_ConnectClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &MetricsServiceV2_ServiceDesc.Streams[0], "/grpc.MetricsServiceV2/Connect", opts...)
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &MetricsServiceV2_ServiceDesc.Streams[0], MetricsServiceV2_Connect_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &metricsServiceV2ConnectClient{stream}
|
||||
x := &metricsServiceV2ConnectClient{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
@@ -93,7 +98,7 @@ func RegisterMetricsServiceV2Server(s grpc.ServiceRegistrar, srv MetricsServiceV
|
||||
}
|
||||
|
||||
func _MetricsServiceV2_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(MetricsServiceV2Server).Connect(&metricsServiceV2ConnectServer{stream})
|
||||
return srv.(MetricsServiceV2Server).Connect(&metricsServiceV2ConnectServer{ServerStream: stream})
|
||||
}
|
||||
|
||||
type MetricsServiceV2_ConnectServer interface {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/model_base_service.proto
|
||||
|
||||
@@ -15,8 +15,23 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
ModelBaseService_GetById_FullMethodName = "/grpc.ModelBaseService/GetById"
|
||||
ModelBaseService_Get_FullMethodName = "/grpc.ModelBaseService/Get"
|
||||
ModelBaseService_GetList_FullMethodName = "/grpc.ModelBaseService/GetList"
|
||||
ModelBaseService_DeleteById_FullMethodName = "/grpc.ModelBaseService/DeleteById"
|
||||
ModelBaseService_Delete_FullMethodName = "/grpc.ModelBaseService/Delete"
|
||||
ModelBaseService_DeleteList_FullMethodName = "/grpc.ModelBaseService/DeleteList"
|
||||
ModelBaseService_ForceDeleteList_FullMethodName = "/grpc.ModelBaseService/ForceDeleteList"
|
||||
ModelBaseService_UpdateById_FullMethodName = "/grpc.ModelBaseService/UpdateById"
|
||||
ModelBaseService_Update_FullMethodName = "/grpc.ModelBaseService/Update"
|
||||
ModelBaseService_UpdateDoc_FullMethodName = "/grpc.ModelBaseService/UpdateDoc"
|
||||
ModelBaseService_Insert_FullMethodName = "/grpc.ModelBaseService/Insert"
|
||||
ModelBaseService_Count_FullMethodName = "/grpc.ModelBaseService/Count"
|
||||
)
|
||||
|
||||
// ModelBaseServiceClient is the client API for ModelBaseService service.
|
||||
//
|
||||
@@ -45,8 +60,9 @@ func NewModelBaseServiceClient(cc grpc.ClientConnInterface) ModelBaseServiceClie
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) GetById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/GetById", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_GetById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -54,8 +70,9 @@ func (c *modelBaseServiceClient) GetById(ctx context.Context, in *Request, opts
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Get", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_Get_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -63,8 +80,9 @@ func (c *modelBaseServiceClient) Get(ctx context.Context, in *Request, opts ...g
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) GetList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/GetList", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_GetList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -72,8 +90,9 @@ func (c *modelBaseServiceClient) GetList(ctx context.Context, in *Request, opts
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) DeleteById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/DeleteById", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_DeleteById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -81,8 +100,9 @@ func (c *modelBaseServiceClient) DeleteById(ctx context.Context, in *Request, op
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) Delete(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Delete", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_Delete_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -90,8 +110,9 @@ func (c *modelBaseServiceClient) Delete(ctx context.Context, in *Request, opts .
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) DeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/DeleteList", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_DeleteList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -99,8 +120,9 @@ func (c *modelBaseServiceClient) DeleteList(ctx context.Context, in *Request, op
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) ForceDeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/ForceDeleteList", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_ForceDeleteList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -108,8 +130,9 @@ func (c *modelBaseServiceClient) ForceDeleteList(ctx context.Context, in *Reques
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) UpdateById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/UpdateById", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_UpdateById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -117,8 +140,9 @@ func (c *modelBaseServiceClient) UpdateById(ctx context.Context, in *Request, op
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) Update(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Update", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_Update_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -126,8 +150,9 @@ func (c *modelBaseServiceClient) Update(ctx context.Context, in *Request, opts .
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) UpdateDoc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/UpdateDoc", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_UpdateDoc_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -135,8 +160,9 @@ func (c *modelBaseServiceClient) UpdateDoc(ctx context.Context, in *Request, opt
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) Insert(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Insert", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_Insert_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -144,8 +170,9 @@ func (c *modelBaseServiceClient) Insert(ctx context.Context, in *Request, opts .
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceClient) Count(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Count", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseService_Count_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -234,7 +261,7 @@ func _ModelBaseService_GetById_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/GetById",
|
||||
FullMethod: ModelBaseService_GetById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).GetById(ctx, req.(*Request))
|
||||
@@ -252,7 +279,7 @@ func _ModelBaseService_Get_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/Get",
|
||||
FullMethod: ModelBaseService_Get_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).Get(ctx, req.(*Request))
|
||||
@@ -270,7 +297,7 @@ func _ModelBaseService_GetList_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/GetList",
|
||||
FullMethod: ModelBaseService_GetList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).GetList(ctx, req.(*Request))
|
||||
@@ -288,7 +315,7 @@ func _ModelBaseService_DeleteById_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/DeleteById",
|
||||
FullMethod: ModelBaseService_DeleteById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).DeleteById(ctx, req.(*Request))
|
||||
@@ -306,7 +333,7 @@ func _ModelBaseService_Delete_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/Delete",
|
||||
FullMethod: ModelBaseService_Delete_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).Delete(ctx, req.(*Request))
|
||||
@@ -324,7 +351,7 @@ func _ModelBaseService_DeleteList_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/DeleteList",
|
||||
FullMethod: ModelBaseService_DeleteList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).DeleteList(ctx, req.(*Request))
|
||||
@@ -342,7 +369,7 @@ func _ModelBaseService_ForceDeleteList_Handler(srv interface{}, ctx context.Cont
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/ForceDeleteList",
|
||||
FullMethod: ModelBaseService_ForceDeleteList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).ForceDeleteList(ctx, req.(*Request))
|
||||
@@ -360,7 +387,7 @@ func _ModelBaseService_UpdateById_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/UpdateById",
|
||||
FullMethod: ModelBaseService_UpdateById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).UpdateById(ctx, req.(*Request))
|
||||
@@ -378,7 +405,7 @@ func _ModelBaseService_Update_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/Update",
|
||||
FullMethod: ModelBaseService_Update_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).Update(ctx, req.(*Request))
|
||||
@@ -396,7 +423,7 @@ func _ModelBaseService_UpdateDoc_Handler(srv interface{}, ctx context.Context, d
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/UpdateDoc",
|
||||
FullMethod: ModelBaseService_UpdateDoc_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).UpdateDoc(ctx, req.(*Request))
|
||||
@@ -414,7 +441,7 @@ func _ModelBaseService_Insert_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/Insert",
|
||||
FullMethod: ModelBaseService_Insert_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).Insert(ctx, req.(*Request))
|
||||
@@ -432,7 +459,7 @@ func _ModelBaseService_Count_Handler(srv interface{}, ctx context.Context, dec f
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseService/Count",
|
||||
FullMethod: ModelBaseService_Count_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceServer).Count(ctx, req.(*Request))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/model_base_service_v2.proto
|
||||
|
||||
@@ -15,8 +15,25 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
ModelBaseServiceV2_GetById_FullMethodName = "/grpc.ModelBaseServiceV2/GetById"
|
||||
ModelBaseServiceV2_GetOne_FullMethodName = "/grpc.ModelBaseServiceV2/GetOne"
|
||||
ModelBaseServiceV2_GetMany_FullMethodName = "/grpc.ModelBaseServiceV2/GetMany"
|
||||
ModelBaseServiceV2_DeleteById_FullMethodName = "/grpc.ModelBaseServiceV2/DeleteById"
|
||||
ModelBaseServiceV2_DeleteOne_FullMethodName = "/grpc.ModelBaseServiceV2/DeleteOne"
|
||||
ModelBaseServiceV2_DeleteMany_FullMethodName = "/grpc.ModelBaseServiceV2/DeleteMany"
|
||||
ModelBaseServiceV2_UpdateById_FullMethodName = "/grpc.ModelBaseServiceV2/UpdateById"
|
||||
ModelBaseServiceV2_UpdateOne_FullMethodName = "/grpc.ModelBaseServiceV2/UpdateOne"
|
||||
ModelBaseServiceV2_UpdateMany_FullMethodName = "/grpc.ModelBaseServiceV2/UpdateMany"
|
||||
ModelBaseServiceV2_ReplaceById_FullMethodName = "/grpc.ModelBaseServiceV2/ReplaceById"
|
||||
ModelBaseServiceV2_ReplaceOne_FullMethodName = "/grpc.ModelBaseServiceV2/ReplaceOne"
|
||||
ModelBaseServiceV2_InsertOne_FullMethodName = "/grpc.ModelBaseServiceV2/InsertOne"
|
||||
ModelBaseServiceV2_InsertMany_FullMethodName = "/grpc.ModelBaseServiceV2/InsertMany"
|
||||
ModelBaseServiceV2_Count_FullMethodName = "/grpc.ModelBaseServiceV2/Count"
|
||||
)
|
||||
|
||||
// ModelBaseServiceV2Client is the client API for ModelBaseServiceV2 service.
|
||||
//
|
||||
@@ -47,8 +64,9 @@ func NewModelBaseServiceV2Client(cc grpc.ClientConnInterface) ModelBaseServiceV2
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) GetById(ctx context.Context, in *ModelServiceV2GetByIdRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/GetById", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -56,8 +74,9 @@ func (c *modelBaseServiceV2Client) GetById(ctx context.Context, in *ModelService
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) GetOne(ctx context.Context, in *ModelServiceV2GetOneRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/GetOne", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetOne_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -65,8 +84,9 @@ func (c *modelBaseServiceV2Client) GetOne(ctx context.Context, in *ModelServiceV
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) GetMany(ctx context.Context, in *ModelServiceV2GetManyRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/GetMany", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetMany_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -74,8 +94,9 @@ func (c *modelBaseServiceV2Client) GetMany(ctx context.Context, in *ModelService
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) DeleteById(ctx context.Context, in *ModelServiceV2DeleteByIdRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/DeleteById", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -83,8 +104,9 @@ func (c *modelBaseServiceV2Client) DeleteById(ctx context.Context, in *ModelServ
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) DeleteOne(ctx context.Context, in *ModelServiceV2DeleteOneRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/DeleteOne", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteOne_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -92,8 +114,9 @@ func (c *modelBaseServiceV2Client) DeleteOne(ctx context.Context, in *ModelServi
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) DeleteMany(ctx context.Context, in *ModelServiceV2DeleteManyRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/DeleteMany", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteMany_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -101,8 +124,9 @@ func (c *modelBaseServiceV2Client) DeleteMany(ctx context.Context, in *ModelServ
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) UpdateById(ctx context.Context, in *ModelServiceV2UpdateByIdRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/UpdateById", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -110,8 +134,9 @@ func (c *modelBaseServiceV2Client) UpdateById(ctx context.Context, in *ModelServ
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) UpdateOne(ctx context.Context, in *ModelServiceV2UpdateOneRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/UpdateOne", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateOne_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -119,8 +144,9 @@ func (c *modelBaseServiceV2Client) UpdateOne(ctx context.Context, in *ModelServi
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) UpdateMany(ctx context.Context, in *ModelServiceV2UpdateManyRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/UpdateMany", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateMany_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -128,8 +154,9 @@ func (c *modelBaseServiceV2Client) UpdateMany(ctx context.Context, in *ModelServ
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) ReplaceById(ctx context.Context, in *ModelServiceV2ReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/ReplaceById", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_ReplaceById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -137,8 +164,9 @@ func (c *modelBaseServiceV2Client) ReplaceById(ctx context.Context, in *ModelSer
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) ReplaceOne(ctx context.Context, in *ModelServiceV2ReplaceOneRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/ReplaceOne", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_ReplaceOne_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -146,8 +174,9 @@ func (c *modelBaseServiceV2Client) ReplaceOne(ctx context.Context, in *ModelServ
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) InsertOne(ctx context.Context, in *ModelServiceV2InsertOneRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/InsertOne", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_InsertOne_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -155,8 +184,9 @@ func (c *modelBaseServiceV2Client) InsertOne(ctx context.Context, in *ModelServi
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) InsertMany(ctx context.Context, in *ModelServiceV2InsertManyRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/InsertMany", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_InsertMany_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -164,8 +194,9 @@ func (c *modelBaseServiceV2Client) InsertMany(ctx context.Context, in *ModelServ
|
||||
}
|
||||
|
||||
func (c *modelBaseServiceV2Client) Count(ctx context.Context, in *ModelServiceV2CountRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/Count", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelBaseServiceV2_Count_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -262,7 +293,7 @@ func _ModelBaseServiceV2_GetById_Handler(srv interface{}, ctx context.Context, d
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/GetById",
|
||||
FullMethod: ModelBaseServiceV2_GetById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).GetById(ctx, req.(*ModelServiceV2GetByIdRequest))
|
||||
@@ -280,7 +311,7 @@ func _ModelBaseServiceV2_GetOne_Handler(srv interface{}, ctx context.Context, de
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/GetOne",
|
||||
FullMethod: ModelBaseServiceV2_GetOne_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).GetOne(ctx, req.(*ModelServiceV2GetOneRequest))
|
||||
@@ -298,7 +329,7 @@ func _ModelBaseServiceV2_GetMany_Handler(srv interface{}, ctx context.Context, d
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/GetMany",
|
||||
FullMethod: ModelBaseServiceV2_GetMany_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).GetMany(ctx, req.(*ModelServiceV2GetManyRequest))
|
||||
@@ -316,7 +347,7 @@ func _ModelBaseServiceV2_DeleteById_Handler(srv interface{}, ctx context.Context
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/DeleteById",
|
||||
FullMethod: ModelBaseServiceV2_DeleteById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).DeleteById(ctx, req.(*ModelServiceV2DeleteByIdRequest))
|
||||
@@ -334,7 +365,7 @@ func _ModelBaseServiceV2_DeleteOne_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/DeleteOne",
|
||||
FullMethod: ModelBaseServiceV2_DeleteOne_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).DeleteOne(ctx, req.(*ModelServiceV2DeleteOneRequest))
|
||||
@@ -352,7 +383,7 @@ func _ModelBaseServiceV2_DeleteMany_Handler(srv interface{}, ctx context.Context
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/DeleteMany",
|
||||
FullMethod: ModelBaseServiceV2_DeleteMany_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).DeleteMany(ctx, req.(*ModelServiceV2DeleteManyRequest))
|
||||
@@ -370,7 +401,7 @@ func _ModelBaseServiceV2_UpdateById_Handler(srv interface{}, ctx context.Context
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/UpdateById",
|
||||
FullMethod: ModelBaseServiceV2_UpdateById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).UpdateById(ctx, req.(*ModelServiceV2UpdateByIdRequest))
|
||||
@@ -388,7 +419,7 @@ func _ModelBaseServiceV2_UpdateOne_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/UpdateOne",
|
||||
FullMethod: ModelBaseServiceV2_UpdateOne_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).UpdateOne(ctx, req.(*ModelServiceV2UpdateOneRequest))
|
||||
@@ -406,7 +437,7 @@ func _ModelBaseServiceV2_UpdateMany_Handler(srv interface{}, ctx context.Context
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/UpdateMany",
|
||||
FullMethod: ModelBaseServiceV2_UpdateMany_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).UpdateMany(ctx, req.(*ModelServiceV2UpdateManyRequest))
|
||||
@@ -424,7 +455,7 @@ func _ModelBaseServiceV2_ReplaceById_Handler(srv interface{}, ctx context.Contex
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/ReplaceById",
|
||||
FullMethod: ModelBaseServiceV2_ReplaceById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).ReplaceById(ctx, req.(*ModelServiceV2ReplaceByIdRequest))
|
||||
@@ -442,7 +473,7 @@ func _ModelBaseServiceV2_ReplaceOne_Handler(srv interface{}, ctx context.Context
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/ReplaceOne",
|
||||
FullMethod: ModelBaseServiceV2_ReplaceOne_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).ReplaceOne(ctx, req.(*ModelServiceV2ReplaceOneRequest))
|
||||
@@ -460,7 +491,7 @@ func _ModelBaseServiceV2_InsertOne_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/InsertOne",
|
||||
FullMethod: ModelBaseServiceV2_InsertOne_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).InsertOne(ctx, req.(*ModelServiceV2InsertOneRequest))
|
||||
@@ -478,7 +509,7 @@ func _ModelBaseServiceV2_InsertMany_Handler(srv interface{}, ctx context.Context
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/InsertMany",
|
||||
FullMethod: ModelBaseServiceV2_InsertMany_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).InsertMany(ctx, req.(*ModelServiceV2InsertManyRequest))
|
||||
@@ -496,7 +527,7 @@ func _ModelBaseServiceV2_Count_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelBaseServiceV2/Count",
|
||||
FullMethod: ModelBaseServiceV2_Count_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelBaseServiceV2Server).Count(ctx, req.(*ModelServiceV2CountRequest))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/model_delegate.proto
|
||||
|
||||
@@ -15,8 +15,12 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
ModelDelegate_Do_FullMethodName = "/grpc.ModelDelegate/Do"
|
||||
)
|
||||
|
||||
// ModelDelegateClient is the client API for ModelDelegate service.
|
||||
//
|
||||
@@ -34,8 +38,9 @@ func NewModelDelegateClient(cc grpc.ClientConnInterface) ModelDelegateClient {
|
||||
}
|
||||
|
||||
func (c *modelDelegateClient) Do(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.ModelDelegate/Do", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, ModelDelegate_Do_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -80,7 +85,7 @@ func _ModelDelegate_Do_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.ModelDelegate/Do",
|
||||
FullMethod: ModelDelegate_Do_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ModelDelegateServer).Do(ctx, req.(*Request))
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -19,6 +20,132 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type NodeServiceRegisterRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
IsMaster bool `protobuf:"varint,3,opt,name=isMaster,proto3" json:"isMaster,omitempty"`
|
||||
AuthKey string `protobuf:"bytes,4,opt,name=authKey,proto3" json:"authKey,omitempty"`
|
||||
MaxRunners int32 `protobuf:"varint,5,opt,name=maxRunners,proto3" json:"maxRunners,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) Reset() {
|
||||
*x = NodeServiceRegisterRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_services_node_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NodeServiceRegisterRequest) ProtoMessage() {}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_services_node_service_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 NodeServiceRegisterRequest.ProtoReflect.Descriptor instead.
|
||||
func (*NodeServiceRegisterRequest) Descriptor() ([]byte, []int) {
|
||||
return file_services_node_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetIsMaster() bool {
|
||||
if x != nil {
|
||||
return x.IsMaster
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetAuthKey() string {
|
||||
if x != nil {
|
||||
return x.AuthKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetMaxRunners() int32 {
|
||||
if x != nil {
|
||||
return x.MaxRunners
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type NodeServiceSendHeartbeatRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeServiceSendHeartbeatRequest) Reset() {
|
||||
*x = NodeServiceSendHeartbeatRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_services_node_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NodeServiceSendHeartbeatRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NodeServiceSendHeartbeatRequest) ProtoMessage() {}
|
||||
|
||||
func (x *NodeServiceSendHeartbeatRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_services_node_service_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 NodeServiceSendHeartbeatRequest.ProtoReflect.Descriptor instead.
|
||||
func (*NodeServiceSendHeartbeatRequest) Descriptor() ([]byte, []int) {
|
||||
return file_services_node_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *NodeServiceSendHeartbeatRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_services_node_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_services_node_service_proto_rawDesc = []byte{
|
||||
@@ -28,44 +155,70 @@ var file_services_node_service_proto_rawDesc = []byte{
|
||||
0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74,
|
||||
0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xfa, 0x01,
|
||||
0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x0a,
|
||||
0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x0d, 0x53, 0x65,
|
||||
0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x0d, 0x2e, 0x67, 0x72,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01,
|
||||
0x0a, 0x1a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67,
|
||||
0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x52,
|
||||
0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61,
|
||||
0x78, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x33, 0x0a, 0x1f, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74,
|
||||
0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x32, 0xfc, 0x01,
|
||||
0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a,
|
||||
0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
|
||||
0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a,
|
||||
0x0d, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x25,
|
||||
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63,
|
||||
0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,
|
||||
0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2e, 0x0a, 0x0b,
|
||||
0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x27, 0x0a, 0x04,
|
||||
0x50, 0x69, 0x6e, 0x67, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
|
||||
0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d,
|
||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2e, 0x0a, 0x0b, 0x55, 0x6e,
|
||||
0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b,
|
||||
0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06,
|
||||
0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_services_node_service_proto_rawDescOnce sync.Once
|
||||
file_services_node_service_proto_rawDescData = file_services_node_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_services_node_service_proto_rawDescGZIP() []byte {
|
||||
file_services_node_service_proto_rawDescOnce.Do(func() {
|
||||
file_services_node_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_node_service_proto_rawDescData)
|
||||
})
|
||||
return file_services_node_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_services_node_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_services_node_service_proto_goTypes = []any{
|
||||
(*Request)(nil), // 0: grpc.Request
|
||||
(*Response)(nil), // 1: grpc.Response
|
||||
(*StreamMessage)(nil), // 2: grpc.StreamMessage
|
||||
(*NodeServiceRegisterRequest)(nil), // 0: grpc.NodeServiceRegisterRequest
|
||||
(*NodeServiceSendHeartbeatRequest)(nil), // 1: grpc.NodeServiceSendHeartbeatRequest
|
||||
(*Request)(nil), // 2: grpc.Request
|
||||
(*Response)(nil), // 3: grpc.Response
|
||||
(*StreamMessage)(nil), // 4: grpc.StreamMessage
|
||||
}
|
||||
var file_services_node_service_proto_depIdxs = []int32{
|
||||
0, // 0: grpc.NodeService.Register:input_type -> grpc.Request
|
||||
0, // 1: grpc.NodeService.SendHeartbeat:input_type -> grpc.Request
|
||||
0, // 2: grpc.NodeService.Ping:input_type -> grpc.Request
|
||||
0, // 3: grpc.NodeService.Subscribe:input_type -> grpc.Request
|
||||
0, // 4: grpc.NodeService.Unsubscribe:input_type -> grpc.Request
|
||||
1, // 5: grpc.NodeService.Register:output_type -> grpc.Response
|
||||
1, // 6: grpc.NodeService.SendHeartbeat:output_type -> grpc.Response
|
||||
1, // 7: grpc.NodeService.Ping:output_type -> grpc.Response
|
||||
2, // 8: grpc.NodeService.Subscribe:output_type -> grpc.StreamMessage
|
||||
1, // 9: grpc.NodeService.Unsubscribe:output_type -> grpc.Response
|
||||
5, // [5:10] is the sub-list for method output_type
|
||||
0, // [0:5] is the sub-list for method input_type
|
||||
0, // 0: grpc.NodeService.Register:input_type -> grpc.NodeServiceRegisterRequest
|
||||
1, // 1: grpc.NodeService.SendHeartbeat:input_type -> grpc.NodeServiceSendHeartbeatRequest
|
||||
2, // 2: grpc.NodeService.Subscribe:input_type -> grpc.Request
|
||||
2, // 3: grpc.NodeService.Unsubscribe:input_type -> grpc.Request
|
||||
3, // 4: grpc.NodeService.Register:output_type -> grpc.Response
|
||||
3, // 5: grpc.NodeService.SendHeartbeat:output_type -> grpc.Response
|
||||
4, // 6: grpc.NodeService.Subscribe:output_type -> grpc.StreamMessage
|
||||
3, // 7: grpc.NodeService.Unsubscribe:output_type -> grpc.Response
|
||||
4, // [4:8] is the sub-list for method output_type
|
||||
0, // [0:4] 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
|
||||
@@ -79,18 +232,45 @@ func file_services_node_service_proto_init() {
|
||||
file_entity_request_proto_init()
|
||||
file_entity_response_proto_init()
|
||||
file_entity_stream_message_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_services_node_service_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*NodeServiceRegisterRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_services_node_service_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*NodeServiceSendHeartbeatRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_services_node_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_services_node_service_proto_goTypes,
|
||||
DependencyIndexes: file_services_node_service_proto_depIdxs,
|
||||
MessageInfos: file_services_node_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_services_node_service_proto = out.File
|
||||
file_services_node_service_proto_rawDesc = nil
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/node_service.proto
|
||||
|
||||
@@ -15,16 +15,22 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
NodeService_Register_FullMethodName = "/grpc.NodeService/Register"
|
||||
NodeService_SendHeartbeat_FullMethodName = "/grpc.NodeService/SendHeartbeat"
|
||||
NodeService_Subscribe_FullMethodName = "/grpc.NodeService/Subscribe"
|
||||
NodeService_Unsubscribe_FullMethodName = "/grpc.NodeService/Unsubscribe"
|
||||
)
|
||||
|
||||
// NodeServiceClient is the client API for NodeService 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 NodeServiceClient interface {
|
||||
Register(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
||||
SendHeartbeat(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
||||
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
||||
Register(ctx context.Context, in *NodeServiceRegisterRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
SendHeartbeat(ctx context.Context, in *NodeServiceSendHeartbeatRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
Subscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (NodeService_SubscribeClient, error)
|
||||
Unsubscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
||||
}
|
||||
@@ -37,27 +43,20 @@ func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient {
|
||||
return &nodeServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *nodeServiceClient) Register(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
func (c *nodeServiceClient) Register(ctx context.Context, in *NodeServiceRegisterRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.NodeService/Register", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, NodeService_Register_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nodeServiceClient) SendHeartbeat(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
func (c *nodeServiceClient) SendHeartbeat(ctx context.Context, in *NodeServiceSendHeartbeatRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.NodeService/SendHeartbeat", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nodeServiceClient) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.NodeService/Ping", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, NodeService_SendHeartbeat_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -65,11 +64,12 @@ func (c *nodeServiceClient) Ping(ctx context.Context, in *Request, opts ...grpc.
|
||||
}
|
||||
|
||||
func (c *nodeServiceClient) Subscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (NodeService_SubscribeClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &NodeService_ServiceDesc.Streams[0], "/grpc.NodeService/Subscribe", opts...)
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &NodeService_ServiceDesc.Streams[0], NodeService_Subscribe_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &nodeServiceSubscribeClient{stream}
|
||||
x := &nodeServiceSubscribeClient{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -97,8 +97,9 @@ func (x *nodeServiceSubscribeClient) Recv() (*StreamMessage, error) {
|
||||
}
|
||||
|
||||
func (c *nodeServiceClient) Unsubscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.NodeService/Unsubscribe", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, NodeService_Unsubscribe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -109,9 +110,8 @@ func (c *nodeServiceClient) Unsubscribe(ctx context.Context, in *Request, opts .
|
||||
// All implementations must embed UnimplementedNodeServiceServer
|
||||
// for forward compatibility
|
||||
type NodeServiceServer interface {
|
||||
Register(context.Context, *Request) (*Response, error)
|
||||
SendHeartbeat(context.Context, *Request) (*Response, error)
|
||||
Ping(context.Context, *Request) (*Response, error)
|
||||
Register(context.Context, *NodeServiceRegisterRequest) (*Response, error)
|
||||
SendHeartbeat(context.Context, *NodeServiceSendHeartbeatRequest) (*Response, error)
|
||||
Subscribe(*Request, NodeService_SubscribeServer) error
|
||||
Unsubscribe(context.Context, *Request) (*Response, error)
|
||||
mustEmbedUnimplementedNodeServiceServer()
|
||||
@@ -121,15 +121,12 @@ type NodeServiceServer interface {
|
||||
type UnimplementedNodeServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedNodeServiceServer) Register(context.Context, *Request) (*Response, error) {
|
||||
func (UnimplementedNodeServiceServer) Register(context.Context, *NodeServiceRegisterRequest) (*Response, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
|
||||
}
|
||||
func (UnimplementedNodeServiceServer) SendHeartbeat(context.Context, *Request) (*Response, error) {
|
||||
func (UnimplementedNodeServiceServer) SendHeartbeat(context.Context, *NodeServiceSendHeartbeatRequest) (*Response, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendHeartbeat not implemented")
|
||||
}
|
||||
func (UnimplementedNodeServiceServer) Ping(context.Context, *Request) (*Response, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
|
||||
}
|
||||
func (UnimplementedNodeServiceServer) Subscribe(*Request, NodeService_SubscribeServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
|
||||
}
|
||||
@@ -150,7 +147,7 @@ func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer) {
|
||||
}
|
||||
|
||||
func _NodeService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Request)
|
||||
in := new(NodeServiceRegisterRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -159,16 +156,16 @@ func _NodeService_Register_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.NodeService/Register",
|
||||
FullMethod: NodeService_Register_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NodeServiceServer).Register(ctx, req.(*Request))
|
||||
return srv.(NodeServiceServer).Register(ctx, req.(*NodeServiceRegisterRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NodeService_SendHeartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Request)
|
||||
in := new(NodeServiceSendHeartbeatRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -177,28 +174,10 @@ func _NodeService_SendHeartbeat_Handler(srv interface{}, ctx context.Context, de
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.NodeService/SendHeartbeat",
|
||||
FullMethod: NodeService_SendHeartbeat_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NodeServiceServer).SendHeartbeat(ctx, req.(*Request))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NodeService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Request)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NodeServiceServer).Ping(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.NodeService/Ping",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NodeServiceServer).Ping(ctx, req.(*Request))
|
||||
return srv.(NodeServiceServer).SendHeartbeat(ctx, req.(*NodeServiceSendHeartbeatRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -208,7 +187,7 @@ func _NodeService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) e
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(NodeServiceServer).Subscribe(m, &nodeServiceSubscribeServer{stream})
|
||||
return srv.(NodeServiceServer).Subscribe(m, &nodeServiceSubscribeServer{ServerStream: stream})
|
||||
}
|
||||
|
||||
type NodeService_SubscribeServer interface {
|
||||
@@ -234,7 +213,7 @@ func _NodeService_Unsubscribe_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.NodeService/Unsubscribe",
|
||||
FullMethod: NodeService_Unsubscribe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NodeServiceServer).Unsubscribe(ctx, req.(*Request))
|
||||
@@ -257,10 +236,6 @@ var NodeService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "SendHeartbeat",
|
||||
Handler: _NodeService_SendHeartbeat_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Ping",
|
||||
Handler: _NodeService_Ping_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Unsubscribe",
|
||||
Handler: _NodeService_Unsubscribe_Handler,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/plugin_service.proto
|
||||
|
||||
@@ -15,8 +15,14 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
PluginService_Register_FullMethodName = "/grpc.PluginService/Register"
|
||||
PluginService_Subscribe_FullMethodName = "/grpc.PluginService/Subscribe"
|
||||
PluginService_Poll_FullMethodName = "/grpc.PluginService/Poll"
|
||||
)
|
||||
|
||||
// PluginServiceClient is the client API for PluginService service.
|
||||
//
|
||||
@@ -36,8 +42,9 @@ func NewPluginServiceClient(cc grpc.ClientConnInterface) PluginServiceClient {
|
||||
}
|
||||
|
||||
func (c *pluginServiceClient) Register(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.PluginService/Register", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, PluginService_Register_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -45,11 +52,12 @@ func (c *pluginServiceClient) Register(ctx context.Context, in *PluginRequest, o
|
||||
}
|
||||
|
||||
func (c *pluginServiceClient) Subscribe(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (PluginService_SubscribeClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[0], "/grpc.PluginService/Subscribe", opts...)
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[0], PluginService_Subscribe_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &pluginServiceSubscribeClient{stream}
|
||||
x := &pluginServiceSubscribeClient{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -77,11 +85,12 @@ func (x *pluginServiceSubscribeClient) Recv() (*StreamMessage, error) {
|
||||
}
|
||||
|
||||
func (c *pluginServiceClient) Poll(ctx context.Context, opts ...grpc.CallOption) (PluginService_PollClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[1], "/grpc.PluginService/Poll", opts...)
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[1], PluginService_Poll_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &pluginServicePollClient{stream}
|
||||
x := &pluginServicePollClient{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
@@ -153,7 +162,7 @@ func _PluginService_Register_Handler(srv interface{}, ctx context.Context, dec f
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.PluginService/Register",
|
||||
FullMethod: PluginService_Register_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PluginServiceServer).Register(ctx, req.(*PluginRequest))
|
||||
@@ -166,7 +175,7 @@ func _PluginService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(PluginServiceServer).Subscribe(m, &pluginServiceSubscribeServer{stream})
|
||||
return srv.(PluginServiceServer).Subscribe(m, &pluginServiceSubscribeServer{ServerStream: stream})
|
||||
}
|
||||
|
||||
type PluginService_SubscribeServer interface {
|
||||
@@ -183,7 +192,7 @@ func (x *pluginServiceSubscribeServer) Send(m *StreamMessage) error {
|
||||
}
|
||||
|
||||
func _PluginService_Poll_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(PluginServiceServer).Poll(&pluginServicePollServer{stream})
|
||||
return srv.(PluginServiceServer).Poll(&pluginServicePollServer{ServerStream: stream})
|
||||
}
|
||||
|
||||
type PluginService_PollServer interface {
|
||||
|
||||
@@ -7,10 +7,20 @@ import "entity/stream_message.proto";
|
||||
package grpc;
|
||||
option go_package = ".;grpc";
|
||||
|
||||
message NodeServiceRegisterRequest {
|
||||
string key = 1;
|
||||
string name = 2;
|
||||
bool isMaster = 3;
|
||||
string authKey = 4;
|
||||
int32 maxRunners = 5;
|
||||
}
|
||||
message NodeServiceSendHeartbeatRequest {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
service NodeService {
|
||||
rpc Register(Request) returns (Response){};
|
||||
rpc SendHeartbeat(Request) returns (Response){};
|
||||
rpc Ping(Request) returns (Response){};
|
||||
rpc Register(NodeServiceRegisterRequest) returns (Response){};
|
||||
rpc SendHeartbeat(NodeServiceSendHeartbeatRequest) returns (Response){};
|
||||
rpc Subscribe(Request) returns (stream StreamMessage){};
|
||||
rpc Unsubscribe(Request) returns (Response){};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.4.0
|
||||
// - protoc v5.27.2
|
||||
// source: services/task_service.proto
|
||||
|
||||
@@ -15,8 +15,14 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.62.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion8
|
||||
|
||||
const (
|
||||
TaskService_Subscribe_FullMethodName = "/grpc.TaskService/Subscribe"
|
||||
TaskService_Fetch_FullMethodName = "/grpc.TaskService/Fetch"
|
||||
TaskService_SendNotification_FullMethodName = "/grpc.TaskService/SendNotification"
|
||||
)
|
||||
|
||||
// TaskServiceClient is the client API for TaskService service.
|
||||
//
|
||||
@@ -36,11 +42,12 @@ func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient {
|
||||
}
|
||||
|
||||
func (c *taskServiceClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (TaskService_SubscribeClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &TaskService_ServiceDesc.Streams[0], "/grpc.TaskService/Subscribe", opts...)
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &TaskService_ServiceDesc.Streams[0], TaskService_Subscribe_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &taskServiceSubscribeClient{stream}
|
||||
x := &taskServiceSubscribeClient{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
@@ -70,8 +77,9 @@ func (x *taskServiceSubscribeClient) CloseAndRecv() (*Response, error) {
|
||||
}
|
||||
|
||||
func (c *taskServiceClient) Fetch(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.TaskService/Fetch", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, TaskService_Fetch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -79,8 +87,9 @@ func (c *taskServiceClient) Fetch(ctx context.Context, in *Request, opts ...grpc
|
||||
}
|
||||
|
||||
func (c *taskServiceClient) SendNotification(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, "/grpc.TaskService/SendNotification", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, TaskService_SendNotification_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -124,7 +133,7 @@ func RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) {
|
||||
}
|
||||
|
||||
func _TaskService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(TaskServiceServer).Subscribe(&taskServiceSubscribeServer{stream})
|
||||
return srv.(TaskServiceServer).Subscribe(&taskServiceSubscribeServer{ServerStream: stream})
|
||||
}
|
||||
|
||||
type TaskService_SubscribeServer interface {
|
||||
@@ -159,7 +168,7 @@ func _TaskService_Fetch_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.TaskService/Fetch",
|
||||
FullMethod: TaskService_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TaskServiceServer).Fetch(ctx, req.(*Request))
|
||||
@@ -177,7 +186,7 @@ func _TaskService_SendNotification_Handler(srv interface{}, ctx context.Context,
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/grpc.TaskService/SendNotification",
|
||||
FullMethod: TaskService_SendNotification_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TaskServiceServer).SendNotification(ctx, req.(*Request))
|
||||
|
||||
Reference in New Issue
Block a user