pb

package
v0.0.0-...-eabca8b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Stock.ProtoReflect.Descriptor instead.

func (*Stock) GetCode

func (x *Stock) GetCode() string

func (*Stock) GetName

func (x *Stock) GetName() string

func (*Stock) GetReport

func (x *Stock) GetReport() string

func (*Stock) ProtoMessage

func (*Stock) ProtoMessage()

func (*Stock) ProtoReflect

func (x *Stock) ProtoReflect() protoreflect.Message

func (*Stock) Reset

func (x *Stock) Reset()

func (*Stock) String

func (x *Stock) String() string

type UnimplementedBrainServer

type UnimplementedBrainServer struct {
}

UnimplementedBrainServer must be embedded to have forward compatible implementations.

func (UnimplementedBrainServer) Find

func (UnimplementedBrainServer) GetVersion

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL