Documentation
¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetAccount() float64
- func (x *Metadata) GetCode() string
- func (x *Metadata) GetDate() string
- func (x *Metadata) GetHigh() float64
- func (x *Metadata) GetLatest() float64
- func (x *Metadata) GetLow() float64
- func (x *Metadata) GetName() string
- func (x *Metadata) GetOpen() float64
- func (x *Metadata) GetSuspend() string
- func (x *Metadata) GetTime() string
- func (x *Metadata) GetVolume() uint64
- func (x *Metadata) GetYesterdayClosed() float64
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- type ServiceClient
- type ServiceServer
- type Service_PullDataClient
- type Service_PullDataServer
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) Collect(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
- func (UnimplementedServiceServer) PullData(*wrapperspb.StringValue, Service_PullDataServer) error
- func (UnimplementedServiceServer) Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "datasource_sina.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _Service_Version_Handler, }, { MethodName: "Collect", Handler: _Service_Collect_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "PullData", Handler: _Service_PullData_Handler, ServerStreams: true, }, }, Metadata: "service.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type Metadata ¶
type Metadata 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"`
Open float64 `protobuf:"fixed64,3,opt,name=open,proto3" json:"open,omitempty"`
YesterdayClosed float64 `protobuf:"fixed64,4,opt,name=yesterday_closed,json=yesterdayClosed,proto3" json:"yesterday_closed,omitempty"`
Latest float64 `protobuf:"fixed64,5,opt,name=latest,proto3" json:"latest,omitempty"`
High float64 `protobuf:"fixed64,6,opt,name=high,proto3" json:"high,omitempty"`
Low float64 `protobuf:"fixed64,7,opt,name=low,proto3" json:"low,omitempty"`
Volume uint64 `protobuf:"varint,8,opt,name=volume,proto3" json:"volume,omitempty"`
Account float64 `protobuf:"fixed64,9,opt,name=account,proto3" json:"account,omitempty"`
Date string `protobuf:"bytes,10,opt,name=date,proto3" json:"date,omitempty"`
Time string `protobuf:"bytes,11,opt,name=time,proto3" json:"time,omitempty"`
Suspend string `protobuf:"bytes,12,opt,name=suspend,proto3" json:"suspend,omitempty"`
// contains filtered or unexported fields
}
func (*Metadata) Descriptor
deprecated
func (*Metadata) GetAccount ¶
func (*Metadata) GetSuspend ¶
func (*Metadata) GetYesterdayClosed ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type ServiceClient ¶
type ServiceClient interface {
Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
Collect(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
PullData(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (Service_PullDataClient, error)
}
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface {
Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
Collect(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
PullData(*wrapperspb.StringValue, Service_PullDataServer) error
// contains filtered or unexported methods
}
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type Service_PullDataClient ¶
type Service_PullDataClient interface {
Recv() (*Metadata, error)
grpc.ClientStream
}
type Service_PullDataServer ¶
type Service_PullDataServer interface {
Send(*Metadata) error
grpc.ServerStream
}
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct {
}
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Collect ¶
func (UnimplementedServiceServer) Collect(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
func (UnimplementedServiceServer) PullData ¶
func (UnimplementedServiceServer) PullData(*wrapperspb.StringValue, Service_PullDataServer) error
func (UnimplementedServiceServer) Version ¶
func (UnimplementedServiceServer) Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.