Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Brain_ServiceDesc = grpc.ServiceDesc{ ServiceName: "brain.Brain", HandlerType: (*BrainServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetVersion", Handler: _Brain_GetVersion_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Find", Handler: _Brain_Find_Handler, ServerStreams: true, }, }, Metadata: "brain.proto", }
Brain_ServiceDesc is the grpc.ServiceDesc for Brain service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_brain_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBrainServer ¶
func RegisterBrainServer(s grpc.ServiceRegistrar, srv BrainServer)
Types ¶
type BrainClient ¶
type BrainClient interface { GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) Find(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Brain_FindClient, error) }
BrainClient is the client API for Brain 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 NewBrainClient ¶
func NewBrainClient(cc grpc.ClientConnInterface) BrainClient
type BrainServer ¶
type BrainServer interface { GetVersion(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) Find(*emptypb.Empty, Brain_FindServer) error // contains filtered or unexported methods }
BrainServer is the server API for Brain service. All implementations must embed UnimplementedBrainServer for forward compatibility
type Brain_FindClient ¶
type Brain_FindClient interface { Recv() (*Stock, error) grpc.ClientStream }
type Brain_FindServer ¶
type Brain_FindServer interface { Send(*Stock) error grpc.ServerStream }
type Stock ¶
type Stock struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Report string `protobuf:"bytes,3,opt,name=report,proto3" json:"report,omitempty"` // contains filtered or unexported fields }
func (*Stock) Descriptor
deprecated
func (*Stock) ProtoMessage ¶
func (*Stock) ProtoMessage()
func (*Stock) ProtoReflect ¶
func (x *Stock) ProtoReflect() protoreflect.Message
type UnimplementedBrainServer ¶
type UnimplementedBrainServer struct { }
UnimplementedBrainServer must be embedded to have forward compatible implementations.
func (UnimplementedBrainServer) Find ¶
func (UnimplementedBrainServer) Find(*emptypb.Empty, Brain_FindServer) error
func (UnimplementedBrainServer) GetVersion ¶
func (UnimplementedBrainServer) GetVersion(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
type UnsafeBrainServer ¶
type UnsafeBrainServer interface {
// contains filtered or unexported methods
}
UnsafeBrainServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BrainServer will result in compilation errors.