Documentation ¶
Index ¶
- Variables
- func RegisterClockServer(s *grpc.Server, srv ClockServer)
- type ClockClient
- type ClockServer
- type LocalReq
- func (*LocalReq) Descriptor() ([]byte, []int)
- func (m *LocalReq) Marshal() (dAtA []byte, err error)
- func (m *LocalReq) MarshalTo(dAtA []byte) (int, error)
- func (*LocalReq) ProtoMessage()
- func (m *LocalReq) Reset()
- func (m *LocalReq) Size() (n int)
- func (m *LocalReq) String() string
- func (m *LocalReq) Unmarshal(dAtA []byte) error
- func (m *LocalReq) XXX_DiscardUnknown()
- func (m *LocalReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *LocalReq) XXX_Merge(src proto.Message)
- func (m *LocalReq) XXX_Size() int
- func (m *LocalReq) XXX_Unmarshal(b []byte) error
- type RemoteReq
- func (*RemoteReq) Descriptor() ([]byte, []int)
- func (m *RemoteReq) GetPeerId() []byte
- func (m *RemoteReq) Marshal() (dAtA []byte, err error)
- func (m *RemoteReq) MarshalTo(dAtA []byte) (int, error)
- func (*RemoteReq) ProtoMessage()
- func (m *RemoteReq) Reset()
- func (m *RemoteReq) Size() (n int)
- func (m *RemoteReq) String() string
- func (m *RemoteReq) Unmarshal(dAtA []byte) error
- func (m *RemoteReq) XXX_DiscardUnknown()
- func (m *RemoteReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RemoteReq) XXX_Merge(src proto.Message)
- func (m *RemoteReq) XXX_Size() int
- func (m *RemoteReq) XXX_Unmarshal(b []byte) error
- type Time
- func (*Time) Descriptor() ([]byte, []int)
- func (m *Time) GetTimestamp() int64
- func (m *Time) Marshal() (dAtA []byte, err error)
- func (m *Time) MarshalTo(dAtA []byte) (int, error)
- func (*Time) ProtoMessage()
- func (m *Time) Reset()
- func (m *Time) Size() (n int)
- func (m *Time) String() string
- func (m *Time) Unmarshal(dAtA []byte) error
- func (m *Time) XXX_DiscardUnknown()
- func (m *Time) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Time) XXX_Merge(src proto.Message)
- func (m *Time) XXX_Size() int
- func (m *Time) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthClock = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowClock = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterClockServer ¶
func RegisterClockServer(s *grpc.Server, srv ClockServer)
Types ¶
type ClockClient ¶
type ClockClient interface { // Returns the local time. Local(ctx context.Context, in *LocalReq, opts ...grpc.CallOption) (*Time, error) // Returns a peer's remote time. Remote(ctx context.Context, in *RemoteReq, opts ...grpc.CallOption) (*Time, error) }
func NewClockClient ¶
func NewClockClient(cc *grpc.ClientConn) ClockClient
type ClockServer ¶
type LocalReq ¶
type LocalReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The Local request message.
func (*LocalReq) Descriptor ¶
func (*LocalReq) ProtoMessage ¶
func (*LocalReq) ProtoMessage()
func (*LocalReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *LocalReq) XXX_DiscardUnknown()
func (*LocalReq) XXX_Marshal ¶ added in v0.2.0
func (*LocalReq) XXX_Unmarshal ¶ added in v0.2.0
type RemoteReq ¶
type RemoteReq struct { PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The Remote request message.
func (*RemoteReq) Descriptor ¶
func (*RemoteReq) ProtoMessage ¶
func (*RemoteReq) ProtoMessage()
func (*RemoteReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *RemoteReq) XXX_DiscardUnknown()
func (*RemoteReq) XXX_Marshal ¶ added in v0.2.0
func (*RemoteReq) XXX_Unmarshal ¶ added in v0.2.0
type Time ¶
type Time struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The time message containing a Unix nano timestamp.
func (*Time) Descriptor ¶
func (*Time) GetTimestamp ¶
func (*Time) ProtoMessage ¶
func (*Time) ProtoMessage()
func (*Time) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *Time) XXX_DiscardUnknown()
func (*Time) XXX_Marshal ¶ added in v0.2.0
func (*Time) XXX_Unmarshal ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.