Documentation ¶
Index ¶
- Variables
- func RegisterTimeServiceServer(s grpc.ServiceRegistrar, srv TimeServiceServer)
- type CallReply
- func (*CallReply) Descriptor() ([]byte, []int)deprecated
- func (x *CallReply) GetDur() *duration.Duration
- func (x *CallReply) GetMessage() string
- func (x *CallReply) GetTs() *timestamp.Timestamp
- func (*CallReply) ProtoMessage()
- func (x *CallReply) ProtoReflect() protoreflect.Message
- func (x *CallReply) Reset()
- func (x *CallReply) String() string
- type CallRequest
- func (*CallRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CallRequest) GetDur() *duration.Duration
- func (x *CallRequest) GetTs() *timestamp.Timestamp
- func (x *CallRequest) GetUserId() uint64
- func (*CallRequest) ProtoMessage()
- func (x *CallRequest) ProtoReflect() protoreflect.Message
- func (x *CallRequest) Reset()
- func (x *CallRequest) String() string
- type TimeService
- type TimeServiceClient
- type TimeServiceServer
- type UnimplementedTimeServiceServer
- type UnsafeTimeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_gtime_proto protoreflect.FileDescriptor
var TimeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gtime.TimeService", HandlerType: (*TimeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TestCall", Handler: _TimeService_TestCall_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gtime.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 CallReply ¶
type CallReply struct { Ts *timestamp.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"` Dur *duration.Duration `protobuf:"bytes,2,opt,name=dur,proto3" json:"dur,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*CallReply) Descriptor
deprecated
func (*CallReply) GetMessage ¶
func (*CallReply) ProtoMessage ¶
func (*CallReply) ProtoMessage()
func (*CallReply) ProtoReflect ¶
func (x *CallReply) ProtoReflect() protoreflect.Message
type CallRequest ¶
type CallRequest struct { Ts *timestamp.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"` Dur *duration.Duration `protobuf:"bytes,2,opt,name=dur,proto3" json:"dur,omitempty"` UserId uint64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*CallRequest) Descriptor
deprecated
func (*CallRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallRequest.ProtoReflect.Descriptor instead.
func (*CallRequest) GetDur ¶
func (x *CallRequest) GetDur() *duration.Duration
func (*CallRequest) GetTs ¶
func (x *CallRequest) GetTs() *timestamp.Timestamp
func (*CallRequest) GetUserId ¶
func (x *CallRequest) GetUserId() uint64
func (*CallRequest) ProtoMessage ¶
func (*CallRequest) ProtoMessage()
func (*CallRequest) ProtoReflect ¶
func (x *CallRequest) ProtoReflect() protoreflect.Message
func (*CallRequest) Reset ¶
func (x *CallRequest) Reset()
func (*CallRequest) String ¶
func (x *CallRequest) String() string
type TimeService ¶
type TimeService struct { UnimplementedTimeServiceServer LastTimestamp time.Time LastDuration time.Duration }
func (*TimeService) TestCall ¶
func (s *TimeService) TestCall(ctx context.Context, req *CallRequest) (*CallReply, error)
type TimeServiceClient ¶
type TimeServiceClient interface {
TestCall(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallReply, 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 { TestCall(context.Context, *CallRequest) (*CallReply, error) // contains filtered or unexported methods }
TimeServiceServer is the server API for TimeService service. All implementations must embed UnimplementedTimeServiceServer for forward compatibility
type UnimplementedTimeServiceServer ¶
type UnimplementedTimeServiceServer struct { }
UnimplementedTimeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTimeServiceServer) TestCall ¶
func (UnimplementedTimeServiceServer) TestCall(context.Context, *CallRequest) (*CallReply, 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.