Documentation ¶
Index ¶
- Variables
- func RegisterHostMapperServer(s grpc.ServiceRegistrar, srv HostMapperServer)
- type HostMapperClient
- type HostMapperServer
- type LookupReply
- type LookupRequest
- func (*LookupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LookupRequest) GetClient() string
- func (x *LookupRequest) GetHost() string
- func (x *LookupRequest) GetNetwork() string
- func (*LookupRequest) ProtoMessage()
- func (x *LookupRequest) ProtoReflect() protoreflect.Message
- func (x *LookupRequest) Reset()
- func (x *LookupRequest) String() string
- type UnimplementedHostMapperServer
- type UnsafeHostMapperServer
Constants ¶
This section is empty.
Variables ¶
var File_hosts_proto protoreflect.FileDescriptor
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", }
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)
Functions ¶
func RegisterHostMapperServer ¶
func RegisterHostMapperServer(s grpc.ServiceRegistrar, srv HostMapperServer)
Types ¶
type HostMapperClient ¶
type HostMapperClient interface {
Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupReply, error)
}
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.
func NewHostMapperClient ¶
func NewHostMapperClient(cc grpc.ClientConnInterface) HostMapperClient
type HostMapperServer ¶
type HostMapperServer interface { Lookup(context.Context, *LookupRequest) (*LookupReply, error) // contains filtered or unexported methods }
HostMapperServer is the server API for HostMapper service. All implementations must embed UnimplementedHostMapperServer for forward compatibility
type LookupReply ¶
type LookupReply struct { Ips []string `protobuf:"bytes,1,rep,name=ips,proto3" json:"ips,omitempty"` Ok bool `protobuf:"varint,2,opt,name=ok,proto3" json:"ok,omitempty"` // contains filtered or unexported fields }
func (*LookupReply) Descriptor
deprecated
func (*LookupReply) Descriptor() ([]byte, []int)
Deprecated: Use LookupReply.ProtoReflect.Descriptor instead.
func (*LookupReply) GetIps ¶
func (x *LookupReply) GetIps() []string
func (*LookupReply) GetOk ¶
func (x *LookupReply) GetOk() bool
func (*LookupReply) ProtoMessage ¶
func (*LookupReply) ProtoMessage()
func (*LookupReply) ProtoReflect ¶
func (x *LookupReply) ProtoReflect() protoreflect.Message
func (*LookupReply) Reset ¶
func (x *LookupReply) Reset()
func (*LookupReply) String ¶
func (x *LookupReply) String() string
type LookupRequest ¶
type LookupRequest struct { Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` Client string `protobuf:"bytes,3,opt,name=client,proto3" json:"client,omitempty"` // contains filtered or unexported fields }
func (*LookupRequest) Descriptor
deprecated
func (*LookupRequest) Descriptor() ([]byte, []int)
Deprecated: Use LookupRequest.ProtoReflect.Descriptor instead.
func (*LookupRequest) GetClient ¶
func (x *LookupRequest) GetClient() string
func (*LookupRequest) GetHost ¶
func (x *LookupRequest) GetHost() string
func (*LookupRequest) GetNetwork ¶
func (x *LookupRequest) GetNetwork() string
func (*LookupRequest) ProtoMessage ¶
func (*LookupRequest) ProtoMessage()
func (*LookupRequest) ProtoReflect ¶
func (x *LookupRequest) ProtoReflect() protoreflect.Message
func (*LookupRequest) Reset ¶
func (x *LookupRequest) Reset()
func (*LookupRequest) String ¶
func (x *LookupRequest) String() string
type UnimplementedHostMapperServer ¶
type UnimplementedHostMapperServer struct { }
UnimplementedHostMapperServer must be embedded to have forward compatible implementations.
func (UnimplementedHostMapperServer) Lookup ¶
func (UnimplementedHostMapperServer) Lookup(context.Context, *LookupRequest) (*LookupReply, error)
type UnsafeHostMapperServer ¶
type UnsafeHostMapperServer interface {
// contains filtered or unexported methods
}
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.