1
0
forked from extern/smegmesh
smegmesh/pkg/rpc/syncservice_grpc.pb.go

142 lines
4.9 KiB
Go
Raw Normal View History

2023-10-10 21:14:40 +02:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.12
// source: pkg/grpc/ctrlserver/syncservice.proto
package rpc
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
// SyncServiceClient is the client API for SyncService 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 SyncServiceClient interface {
GetConf(ctx context.Context, in *GetConfRequest, opts ...grpc.CallOption) (*GetConfReply, error)
SyncMesh(ctx context.Context, in *SyncMeshRequest, opts ...grpc.CallOption) (*SyncMeshReply, error)
}
type syncServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSyncServiceClient(cc grpc.ClientConnInterface) SyncServiceClient {
return &syncServiceClient{cc}
}
func (c *syncServiceClient) GetConf(ctx context.Context, in *GetConfRequest, opts ...grpc.CallOption) (*GetConfReply, error) {
out := new(GetConfReply)
err := c.cc.Invoke(ctx, "/syncservice.SyncService/GetConf", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *syncServiceClient) SyncMesh(ctx context.Context, in *SyncMeshRequest, opts ...grpc.CallOption) (*SyncMeshReply, error) {
out := new(SyncMeshReply)
err := c.cc.Invoke(ctx, "/syncservice.SyncService/SyncMesh", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SyncServiceServer is the server API for SyncService service.
// All implementations must embed UnimplementedSyncServiceServer
// for forward compatibility
type SyncServiceServer interface {
GetConf(context.Context, *GetConfRequest) (*GetConfReply, error)
SyncMesh(context.Context, *SyncMeshRequest) (*SyncMeshReply, error)
mustEmbedUnimplementedSyncServiceServer()
}
// UnimplementedSyncServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSyncServiceServer struct {
}
func (UnimplementedSyncServiceServer) GetConf(context.Context, *GetConfRequest) (*GetConfReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetConf not implemented")
}
func (UnimplementedSyncServiceServer) SyncMesh(context.Context, *SyncMeshRequest) (*SyncMeshReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method SyncMesh not implemented")
}
func (UnimplementedSyncServiceServer) mustEmbedUnimplementedSyncServiceServer() {}
// UnsafeSyncServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SyncServiceServer will
// result in compilation errors.
type UnsafeSyncServiceServer interface {
mustEmbedUnimplementedSyncServiceServer()
}
func RegisterSyncServiceServer(s grpc.ServiceRegistrar, srv SyncServiceServer) {
s.RegisterService(&SyncService_ServiceDesc, srv)
}
func _SyncService_GetConf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetConfRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SyncServiceServer).GetConf(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/syncservice.SyncService/GetConf",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SyncServiceServer).GetConf(ctx, req.(*GetConfRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SyncService_SyncMesh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncMeshRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SyncServiceServer).SyncMesh(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/syncservice.SyncService/SyncMesh",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SyncServiceServer).SyncMesh(ctx, req.(*SyncMeshRequest))
}
return interceptor(ctx, in, info, handler)
}
// SyncService_ServiceDesc is the grpc.ServiceDesc for SyncService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SyncService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "syncservice.SyncService",
HandlerType: (*SyncServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetConf",
Handler: _SyncService_GetConf_Handler,
},
{
MethodName: "SyncMesh",
Handler: _SyncService_SyncMesh_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pkg/grpc/ctrlserver/syncservice.proto",
}