Documentation ¶
Index ¶
- Variables
- func RegisterTimeServiceServer(s grpc.ServiceRegistrar, srv TimeServiceServer)
- type Request
- type Response
- type TimeServiceClient
- type TimeServiceServer
- type TimeService_SubscribeOnTimeClient
- type TimeService_SubscribeOnTimeServer
- type UnimplementedTimeServiceServer
- type UnsafeTimeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_github_com_dipdup_net_indexer_sdk_examples_grpc_proto_time_proto protoreflect.FileDescriptor
var TimeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.TimeService", HandlerType: (*TimeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UnsubscribeFromTime", Handler: _TimeService_UnsubscribeFromTime_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SubscribeOnTime", Handler: _TimeService_SubscribeOnTime_Handler, ServerStreams: true, }, }, Metadata: "github.com/dipdup-net/indexer-sdk/examples/grpc/proto/time.proto", }
TimeService_ServiceDesc is the grpc.ServiceDesc for TimeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTimeServiceServer ¶
func RegisterTimeServiceServer(s grpc.ServiceRegistrar, srv TimeServiceServer)
Types ¶
type Request ¶
type Request struct {
// 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 { Response *pb.SubscribeResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetResponse ¶
func (x *Response) GetResponse() *pb.SubscribeResponse
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type TimeServiceClient ¶
type TimeServiceClient interface { SubscribeOnTime(ctx context.Context, in *Request, opts ...grpc.CallOption) (TimeService_SubscribeOnTimeClient, error) UnsubscribeFromTime(ctx context.Context, in *pb.UnsubscribeRequest, opts ...grpc.CallOption) (*pb.UnsubscribeResponse, error) }
TimeServiceClient is the client API for TimeService 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 NewTimeServiceClient ¶
func NewTimeServiceClient(cc grpc.ClientConnInterface) TimeServiceClient
type TimeServiceServer ¶
type TimeServiceServer interface { SubscribeOnTime(*Request, TimeService_SubscribeOnTimeServer) error UnsubscribeFromTime(context.Context, *pb.UnsubscribeRequest) (*pb.UnsubscribeResponse, error) // contains filtered or unexported methods }
TimeServiceServer is the server API for TimeService service. All implementations must embed UnimplementedTimeServiceServer for forward compatibility
type TimeService_SubscribeOnTimeClient ¶
type TimeService_SubscribeOnTimeClient interface { Recv() (*Response, error) grpc.ClientStream }
type TimeService_SubscribeOnTimeServer ¶
type TimeService_SubscribeOnTimeServer interface { Send(*Response) error grpc.ServerStream }
type UnimplementedTimeServiceServer ¶
type UnimplementedTimeServiceServer struct { }
UnimplementedTimeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTimeServiceServer) SubscribeOnTime ¶
func (UnimplementedTimeServiceServer) SubscribeOnTime(*Request, TimeService_SubscribeOnTimeServer) error
func (UnimplementedTimeServiceServer) UnsubscribeFromTime ¶
func (UnimplementedTimeServiceServer) UnsubscribeFromTime(context.Context, *pb.UnsubscribeRequest) (*pb.UnsubscribeResponse, error)
type UnsafeTimeServiceServer ¶
type UnsafeTimeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTimeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TimeServiceServer will result in compilation errors.