Documentation ¶
Index ¶
- Variables
- func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer)
- type GetRouteReply
- func (*GetRouteReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetRouteReply) GetGateway() string
- func (x *GetRouteReply) GetNet() string
- func (*GetRouteReply) ProtoMessage()
- func (x *GetRouteReply) ProtoReflect() protoreflect.Message
- func (x *GetRouteReply) Reset()
- func (x *GetRouteReply) String() string
- type GetRouteRequest
- type RouterClient
- type RouterServer
- type UnimplementedRouterServer
- type UnsafeRouterServer
Constants ¶
This section is empty.
Variables ¶
var File_router_proto protoreflect.FileDescriptor
var Router_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Router", HandlerType: (*RouterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetRoute", Handler: _Router_GetRoute_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "router.proto", }
Router_ServiceDesc is the grpc.ServiceDesc for Router service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRouterServer ¶
func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer)
Types ¶
type GetRouteReply ¶
type GetRouteReply struct { Net string `protobuf:"bytes,1,opt,name=net,proto3" json:"net,omitempty"` Gateway string `protobuf:"bytes,2,opt,name=gateway,proto3" json:"gateway,omitempty"` // contains filtered or unexported fields }
func (*GetRouteReply) Descriptor
deprecated
func (*GetRouteReply) Descriptor() ([]byte, []int)
Deprecated: Use GetRouteReply.ProtoReflect.Descriptor instead.
func (*GetRouteReply) GetGateway ¶
func (x *GetRouteReply) GetGateway() string
func (*GetRouteReply) GetNet ¶
func (x *GetRouteReply) GetNet() string
func (*GetRouteReply) ProtoMessage ¶
func (*GetRouteReply) ProtoMessage()
func (*GetRouteReply) ProtoReflect ¶
func (x *GetRouteReply) ProtoReflect() protoreflect.Message
func (*GetRouteReply) Reset ¶
func (x *GetRouteReply) Reset()
func (*GetRouteReply) String ¶
func (x *GetRouteReply) String() string
type GetRouteRequest ¶
type GetRouteRequest struct { Dst string `protobuf:"bytes,1,opt,name=dst,proto3" json:"dst,omitempty"` // contains filtered or unexported fields }
func (*GetRouteRequest) Descriptor
deprecated
func (*GetRouteRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRouteRequest.ProtoReflect.Descriptor instead.
func (*GetRouteRequest) GetDst ¶
func (x *GetRouteRequest) GetDst() string
func (*GetRouteRequest) ProtoMessage ¶
func (*GetRouteRequest) ProtoMessage()
func (*GetRouteRequest) ProtoReflect ¶
func (x *GetRouteRequest) ProtoReflect() protoreflect.Message
func (*GetRouteRequest) Reset ¶
func (x *GetRouteRequest) Reset()
func (*GetRouteRequest) String ¶
func (x *GetRouteRequest) String() string
type RouterClient ¶
type RouterClient interface {
GetRoute(ctx context.Context, in *GetRouteRequest, opts ...grpc.CallOption) (*GetRouteReply, error)
}
RouterClient is the client API for Router 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 NewRouterClient ¶
func NewRouterClient(cc grpc.ClientConnInterface) RouterClient
type RouterServer ¶
type RouterServer interface { GetRoute(context.Context, *GetRouteRequest) (*GetRouteReply, error) // contains filtered or unexported methods }
RouterServer is the server API for Router service. All implementations must embed UnimplementedRouterServer for forward compatibility
type UnimplementedRouterServer ¶
type UnimplementedRouterServer struct { }
UnimplementedRouterServer must be embedded to have forward compatible implementations.
func (UnimplementedRouterServer) GetRoute ¶
func (UnimplementedRouterServer) GetRoute(context.Context, *GetRouteRequest) (*GetRouteReply, error)
type UnsafeRouterServer ¶
type UnsafeRouterServer interface {
// contains filtered or unexported methods
}
UnsafeRouterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RouterServer will result in compilation errors.