Documentation
¶
Index ¶
- Variables
- func RegisterTimeServiceServer(s *grpc.Server, srv TimeServiceServer)
- type Time
- func (*Time) Descriptor() ([]byte, []int)deprecated
- func (x *Time) GetLocaltime() *timestamp.Timestamp
- func (x *Time) GetMetadata() *common.Metadata
- func (x *Time) GetRemotetime() *timestamp.Timestamp
- func (x *Time) GetServer() string
- func (*Time) ProtoMessage()
- func (x *Time) ProtoReflect() protoreflect.Message
- func (x *Time) Reset()
- func (x *Time) String() string
- type TimeRequest
- type TimeResponse
- type TimeServiceClient
- type TimeServiceServer
- type UnimplementedTimeServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_time_time_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTimeServiceServer ¶
func RegisterTimeServiceServer(s *grpc.Server, 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 *timestamp.Timestamp `protobuf:"bytes,3,opt,name=localtime,proto3" json:"localtime,omitempty"` Remotetime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=remotetime,proto3" json:"remotetime,omitempty"` // contains filtered or unexported fields }
func (*Time) Descriptor
deprecated
func (*Time) GetLocaltime ¶
func (*Time) GetMetadata ¶
func (*Time) GetRemotetime ¶
func (*Time) ProtoMessage ¶
func (*Time) ProtoMessage()
func (*Time) ProtoReflect ¶ added in v0.6.0
func (x *Time) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*TimeRequest) ProtoMessage()
func (*TimeRequest) ProtoReflect ¶ added in v0.6.0
func (x *TimeRequest) ProtoReflect() protoreflect.Message
func (*TimeRequest) Reset ¶
func (x *TimeRequest) Reset()
func (*TimeRequest) String ¶
func (x *TimeRequest) String() string
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) ProtoMessage ¶
func (*TimeResponse) ProtoMessage()
func (*TimeResponse) ProtoReflect ¶ added in v0.6.0
func (x *TimeResponse) ProtoReflect() protoreflect.Message
func (*TimeResponse) Reset ¶
func (x *TimeResponse) Reset()
func (*TimeResponse) String ¶
func (x *TimeResponse) String() string
type TimeServiceClient ¶
type TimeServiceClient interface { Time(ctx context.Context, in *empty.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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTimeServiceClient ¶
func NewTimeServiceClient(cc grpc.ClientConnInterface) TimeServiceClient
type TimeServiceServer ¶
type TimeServiceServer interface { Time(context.Context, *empty.Empty) (*TimeResponse, error) TimeCheck(context.Context, *TimeRequest) (*TimeResponse, error) }
TimeServiceServer is the server API for TimeService service.
type UnimplementedTimeServiceServer ¶ added in v0.6.0
type UnimplementedTimeServiceServer struct { }
UnimplementedTimeServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedTimeServiceServer) Time ¶ added in v0.6.0
func (*UnimplementedTimeServiceServer) Time(context.Context, *empty.Empty) (*TimeResponse, error)
func (*UnimplementedTimeServiceServer) TimeCheck ¶ added in v0.6.0
func (*UnimplementedTimeServiceServer) TimeCheck(context.Context, *TimeRequest) (*TimeResponse, error)
Click to show internal directories.
Click to hide internal directories.