106 lines
3.5 KiB
Go
106 lines
3.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.15.8
|
|
// source: hosts.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
|
|
|
|
// HostMapperClient is the client API for HostMapper 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 HostMapperClient interface {
|
|
Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupReply, error)
|
|
}
|
|
|
|
type hostMapperClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewHostMapperClient(cc grpc.ClientConnInterface) HostMapperClient {
|
|
return &hostMapperClient{cc}
|
|
}
|
|
|
|
func (c *hostMapperClient) Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupReply, error) {
|
|
out := new(LookupReply)
|
|
err := c.cc.Invoke(ctx, "/proto.HostMapper/Lookup", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// HostMapperServer is the server API for HostMapper service.
|
|
// All implementations must embed UnimplementedHostMapperServer
|
|
// for forward compatibility
|
|
type HostMapperServer interface {
|
|
Lookup(context.Context, *LookupRequest) (*LookupReply, error)
|
|
mustEmbedUnimplementedHostMapperServer()
|
|
}
|
|
|
|
// UnimplementedHostMapperServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedHostMapperServer struct {
|
|
}
|
|
|
|
func (UnimplementedHostMapperServer) Lookup(context.Context, *LookupRequest) (*LookupReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Lookup not implemented")
|
|
}
|
|
func (UnimplementedHostMapperServer) mustEmbedUnimplementedHostMapperServer() {}
|
|
|
|
// UnsafeHostMapperServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to HostMapperServer will
|
|
// result in compilation errors.
|
|
type UnsafeHostMapperServer interface {
|
|
mustEmbedUnimplementedHostMapperServer()
|
|
}
|
|
|
|
func RegisterHostMapperServer(s grpc.ServiceRegistrar, srv HostMapperServer) {
|
|
s.RegisterService(&HostMapper_ServiceDesc, srv)
|
|
}
|
|
|
|
func _HostMapper_Lookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LookupRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(HostMapperServer).Lookup(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.HostMapper/Lookup",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HostMapperServer).Lookup(ctx, req.(*LookupRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// HostMapper_ServiceDesc is the grpc.ServiceDesc for HostMapper service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var HostMapper_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "proto.HostMapper",
|
|
HandlerType: (*HostMapperServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Lookup",
|
|
Handler: _HostMapper_Lookup_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "hosts.proto",
|
|
}
|