time

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeService_Time_FullMethodName      = "/time.TimeService/Time"
	TimeService_TimeCheck_FullMethodName = "/time.TimeService/TimeCheck"
)

Variables

View Source
var File_time_time_proto protoreflect.FileDescriptor
View Source
var TimeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "time.TimeService",
	HandlerType: (*TimeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Time",
			Handler:    _TimeService_Time_Handler,
		},
		{
			MethodName: "TimeCheck",
			Handler:    _TimeService_TimeCheck_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "time/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 Time

type Time struct {
	Metadata   *common.Metadata       `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Server     string                 `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
	Localtime  *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=localtime,proto3" json:"localtime,omitempty"`
	Remotetime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=remotetime,proto3" json:"remotetime,omitempty"`
	// contains filtered or unexported fields
}

func (*Time) Descriptor deprecated

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

Deprecated: Use Time.ProtoReflect.Descriptor instead.

func (*Time) GetLocaltime

func (x *Time) GetLocaltime() *timestamppb.Timestamp

func (*Time) GetMetadata

func (x *Time) GetMetadata() *common.Metadata

func (*Time) GetRemotetime

func (x *Time) GetRemotetime() *timestamppb.Timestamp

func (*Time) GetServer

func (x *Time) GetServer() string

func (*Time) MarshalToSizedBufferVT

func (m *Time) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Time) MarshalToVT

func (m *Time) MarshalToVT(dAtA []byte) (int, error)

func (*Time) MarshalVT

func (m *Time) MarshalVT() (dAtA []byte, err error)

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) ProtoReflect

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

func (*Time) Reset

func (x *Time) Reset()

func (*Time) SizeVT

func (m *Time) SizeVT() (n int)

func (*Time) String

func (x *Time) String() string

func (*Time) UnmarshalVT

func (m *Time) UnmarshalVT(dAtA []byte) error

type TimeRequest

type TimeRequest struct {
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// contains filtered or unexported fields
}

The response message containing the ntp server

func (*TimeRequest) Descriptor deprecated

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

Deprecated: Use TimeRequest.ProtoReflect.Descriptor instead.

func (*TimeRequest) GetServer

func (x *TimeRequest) GetServer() string

func (*TimeRequest) MarshalToSizedBufferVT

func (m *TimeRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TimeRequest) MarshalToVT

func (m *TimeRequest) MarshalToVT(dAtA []byte) (int, error)

func (*TimeRequest) MarshalVT

func (m *TimeRequest) MarshalVT() (dAtA []byte, err error)

func (*TimeRequest) ProtoMessage

func (*TimeRequest) ProtoMessage()

func (*TimeRequest) ProtoReflect

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

func (*TimeRequest) Reset

func (x *TimeRequest) Reset()

func (*TimeRequest) SizeVT

func (m *TimeRequest) SizeVT() (n int)

func (*TimeRequest) String

func (x *TimeRequest) String() string

func (*TimeRequest) UnmarshalVT

func (m *TimeRequest) UnmarshalVT(dAtA []byte) error

type TimeResponse

type TimeResponse struct {
	Messages []*Time `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

The response message containing the ntp server, time, and offset

func (*TimeResponse) Descriptor deprecated

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

Deprecated: Use TimeResponse.ProtoReflect.Descriptor instead.

func (*TimeResponse) GetMessages

func (x *TimeResponse) GetMessages() []*Time

func (*TimeResponse) MarshalToSizedBufferVT

func (m *TimeResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TimeResponse) MarshalToVT

func (m *TimeResponse) MarshalToVT(dAtA []byte) (int, error)

func (*TimeResponse) MarshalVT

func (m *TimeResponse) MarshalVT() (dAtA []byte, err error)

func (*TimeResponse) ProtoMessage

func (*TimeResponse) ProtoMessage()

func (*TimeResponse) ProtoReflect

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

func (*TimeResponse) Reset

func (x *TimeResponse) Reset()

func (*TimeResponse) SizeVT

func (m *TimeResponse) SizeVT() (n int)

func (*TimeResponse) String

func (x *TimeResponse) String() string

func (*TimeResponse) UnmarshalVT

func (m *TimeResponse) UnmarshalVT(dAtA []byte) error

type TimeServiceClient

type TimeServiceClient interface {
	Time(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TimeResponse, error)
	TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeResponse, 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 {
	Time(context.Context, *emptypb.Empty) (*TimeResponse, error)
	TimeCheck(context.Context, *TimeRequest) (*TimeResponse, 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) Time

func (UnimplementedTimeServiceServer) TimeCheck

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.

Jump to

Keyboard shortcuts

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