Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_gtime_proto protoreflect.FileDescriptor
View Source
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

    func (*CallReply) Descriptor() ([]byte, []int)

      Deprecated: Use CallReply.ProtoReflect.Descriptor instead.

      func (*CallReply) GetDur

      func (x *CallReply) GetDur() *duration.Duration

      func (*CallReply) GetMessage

      func (x *CallReply) GetMessage() string

      func (*CallReply) GetTs

      func (x *CallReply) GetTs() *timestamp.Timestamp

      func (*CallReply) ProtoMessage

      func (*CallReply) ProtoMessage()

      func (*CallReply) ProtoReflect

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

      func (*CallReply) Reset

      func (x *CallReply) Reset()

      func (*CallReply) String

      func (x *CallReply) String() string

      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

      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.

          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

              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.