Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AddService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.AddService", HandlerType: (*AddServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _AddService_Hello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/service.proto", }
AddService_ServiceDesc is the grpc.ServiceDesc for AddService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAddServiceServer ¶
func RegisterAddServiceServer(s grpc.ServiceRegistrar, srv AddServiceServer)
Types ¶
type AddServiceClient ¶
type AddServiceClient interface {
Hello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloRes, error)
}
AddServiceClient is the client API for AddService 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 NewAddServiceClient ¶
func NewAddServiceClient(cc grpc.ClientConnInterface) AddServiceClient
type AddServiceServer ¶
type AddServiceServer interface { Hello(context.Context, *HelloReq) (*HelloRes, error) // contains filtered or unexported methods }
AddServiceServer is the server API for AddService service. All implementations must embed UnimplementedAddServiceServer for forward compatibility
type HelloReq ¶
type HelloReq struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
func (*HelloReq) Descriptor
deprecated
func (*HelloReq) ProtoMessage ¶
func (*HelloReq) ProtoMessage()
func (*HelloReq) ProtoReflect ¶
func (x *HelloReq) ProtoReflect() protoreflect.Message
type HelloRes ¶
type HelloRes struct { MsgRes string `protobuf:"bytes,1,opt,name=msg_res,json=msgRes,proto3" json:"msg_res,omitempty"` // contains filtered or unexported fields }
func (*HelloRes) Descriptor
deprecated
func (*HelloRes) ProtoMessage ¶
func (*HelloRes) ProtoMessage()
func (*HelloRes) ProtoReflect ¶
func (x *HelloRes) ProtoReflect() protoreflect.Message
type UnimplementedAddServiceServer ¶
type UnimplementedAddServiceServer struct { }
UnimplementedAddServiceServer must be embedded to have forward compatible implementations.
type UnsafeAddServiceServer ¶
type UnsafeAddServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAddServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AddServiceServer will result in compilation errors.