Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Api_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Api", HandlerType: (*ApiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ApiTest", Handler: _Api_ApiTest_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
Api_ServiceDesc is the grpc.ServiceDesc for Api service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterApiServer ¶
func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer)
Types ¶
type ApiClient ¶
type ApiClient interface {
ApiTest(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
ApiClient is the client API for Api 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 NewApiClient ¶
func NewApiClient(cc grpc.ClientConnInterface) ApiClient
type ApiServer ¶
ApiServer is the server API for Api service. All implementations should embed UnimplementedApiServer for forward compatibility
type Request ¶
type Request struct { Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedApiServer ¶
type UnimplementedApiServer struct { }
UnimplementedApiServer should be embedded to have forward compatible implementations.
type UnsafeApiServer ¶
type UnsafeApiServer interface {
// contains filtered or unexported methods
}
UnsafeApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ApiServer will result in compilation errors.