add hop plugin
This commit is contained in:
105
hop/proto/hop_grpc.pb.go
Normal file
105
hop/proto/hop_grpc.pb.go
Normal file
@ -0,0 +1,105 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.15.8
|
||||
// source: hop.proto
|
||||
|
||||
package proto
|
||||
|
||||
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
|
||||
|
||||
// HopClient is the client API for Hop 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 HopClient interface {
|
||||
Select(ctx context.Context, in *SelectRequest, opts ...grpc.CallOption) (*SelectReply, error)
|
||||
}
|
||||
|
||||
type hopClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewHopClient(cc grpc.ClientConnInterface) HopClient {
|
||||
return &hopClient{cc}
|
||||
}
|
||||
|
||||
func (c *hopClient) Select(ctx context.Context, in *SelectRequest, opts ...grpc.CallOption) (*SelectReply, error) {
|
||||
out := new(SelectReply)
|
||||
err := c.cc.Invoke(ctx, "/proto.Hop/Select", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// HopServer is the server API for Hop service.
|
||||
// All implementations must embed UnimplementedHopServer
|
||||
// for forward compatibility
|
||||
type HopServer interface {
|
||||
Select(context.Context, *SelectRequest) (*SelectReply, error)
|
||||
mustEmbedUnimplementedHopServer()
|
||||
}
|
||||
|
||||
// UnimplementedHopServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedHopServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedHopServer) Select(context.Context, *SelectRequest) (*SelectReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Select not implemented")
|
||||
}
|
||||
func (UnimplementedHopServer) mustEmbedUnimplementedHopServer() {}
|
||||
|
||||
// UnsafeHopServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to HopServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeHopServer interface {
|
||||
mustEmbedUnimplementedHopServer()
|
||||
}
|
||||
|
||||
func RegisterHopServer(s grpc.ServiceRegistrar, srv HopServer) {
|
||||
s.RegisterService(&Hop_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Hop_Select_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SelectRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HopServer).Select(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.Hop/Select",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HopServer).Select(ctx, req.(*SelectRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Hop_ServiceDesc is the grpc.ServiceDesc for Hop service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Hop_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "proto.Hop",
|
||||
HandlerType: (*HopServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Select",
|
||||
Handler: _Hop_Select_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "hop.proto",
|
||||
}
|
Reference in New Issue
Block a user