Documentation
¶
Index ¶
- func RegisterTimeServiceServer(s *grpc.Server, srv TimeServiceServer)
- type Time
- func (*Time) Descriptor() ([]byte, []int)
- func (m *Time) GetLocaltime() *timestamp.Timestamp
- func (m *Time) GetMetadata() *common.Metadata
- func (m *Time) GetRemotetime() *timestamp.Timestamp
- func (m *Time) GetServer() string
- func (*Time) ProtoMessage()
- func (m *Time) Reset()
- func (m *Time) String() string
- func (m *Time) XXX_DiscardUnknown()
- func (m *Time) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Time) XXX_Merge(src proto.Message)
- func (m *Time) XXX_Size() int
- func (m *Time) XXX_Unmarshal(b []byte) error
- type TimeRequest
- func (*TimeRequest) Descriptor() ([]byte, []int)
- func (m *TimeRequest) GetServer() string
- func (*TimeRequest) ProtoMessage()
- func (m *TimeRequest) Reset()
- func (m *TimeRequest) String() string
- func (m *TimeRequest) XXX_DiscardUnknown()
- func (m *TimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TimeRequest) XXX_Merge(src proto.Message)
- func (m *TimeRequest) XXX_Size() int
- func (m *TimeRequest) XXX_Unmarshal(b []byte) error
- type TimeResponse
- func (*TimeResponse) Descriptor() ([]byte, []int)
- func (m *TimeResponse) GetMessages() []*Time
- func (*TimeResponse) ProtoMessage()
- func (m *TimeResponse) Reset()
- func (m *TimeResponse) String() string
- func (m *TimeResponse) XXX_DiscardUnknown()
- func (m *TimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TimeResponse) XXX_Merge(src proto.Message)
- func (m *TimeResponse) XXX_Size() int
- func (m *TimeResponse) XXX_Unmarshal(b []byte) error
- type TimeServiceClient
- type TimeServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Time) Descriptor ¶
func (*Time) GetLocaltime ¶
func (*Time) GetMetadata ¶
func (*Time) GetRemotetime ¶
func (*Time) ProtoMessage ¶
func (*Time) ProtoMessage()
func (*Time) XXX_DiscardUnknown ¶
func (m *Time) XXX_DiscardUnknown()
func (*Time) XXX_Unmarshal ¶
type TimeRequest ¶
type TimeRequest struct {
Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
The response message containing the ntp server
func (*TimeRequest) Descriptor ¶
func (*TimeRequest) Descriptor() ([]byte, []int)
func (*TimeRequest) GetServer ¶
func (m *TimeRequest) GetServer() string
func (*TimeRequest) ProtoMessage ¶
func (*TimeRequest) ProtoMessage()
func (*TimeRequest) Reset ¶
func (m *TimeRequest) Reset()
func (*TimeRequest) String ¶
func (m *TimeRequest) String() string
func (*TimeRequest) XXX_DiscardUnknown ¶
func (m *TimeRequest) XXX_DiscardUnknown()
func (*TimeRequest) XXX_Marshal ¶
func (m *TimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TimeRequest) XXX_Merge ¶
func (m *TimeRequest) XXX_Merge(src proto.Message)
func (*TimeRequest) XXX_Size ¶
func (m *TimeRequest) XXX_Size() int
func (*TimeRequest) XXX_Unmarshal ¶
func (m *TimeRequest) XXX_Unmarshal(b []byte) error
type TimeResponse ¶
type TimeResponse struct {
Messages []*Time `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
The response message containing the ntp server, time, and offset
func (*TimeResponse) Descriptor ¶
func (*TimeResponse) Descriptor() ([]byte, []int)
func (*TimeResponse) GetMessages ¶
func (m *TimeResponse) GetMessages() []*Time
func (*TimeResponse) ProtoMessage ¶
func (*TimeResponse) ProtoMessage()
func (*TimeResponse) Reset ¶
func (m *TimeResponse) Reset()
func (*TimeResponse) String ¶
func (m *TimeResponse) String() string
func (*TimeResponse) XXX_DiscardUnknown ¶
func (m *TimeResponse) XXX_DiscardUnknown()
func (*TimeResponse) XXX_Marshal ¶
func (m *TimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TimeResponse) XXX_Merge ¶
func (m *TimeResponse) XXX_Merge(src proto.Message)
func (*TimeResponse) XXX_Size ¶
func (m *TimeResponse) XXX_Size() int
func (*TimeResponse) XXX_Unmarshal ¶
func (m *TimeResponse) XXX_Unmarshal(b []byte) error
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.ClientConn) 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.
Click to show internal directories.
Click to hide internal directories.