Versions in this module Expand all Collapse all v1 v1.1.9 Oct 1, 2018 Changes in this version + var ErrIntOverflowHeartbeat = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthHeartbeat = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrNotConnected = errors.New("not connected") + var ErrNotHeartbeated = errors.New("not yet heartbeated") + var SourceAddr = func() net.Addr { ... }() + func NewServer(ctx *Context) *grpc.Server + func RegisterHeartbeatServer(s *grpc.Server, srv HeartbeatServer) + type Context struct + AmbientCtx log.AmbientContext + BreakerFactory func() *circuit.Breaker + HeartbeatCB func() + LocalClock *hlc.Clock + RemoteClocks *RemoteClockMonitor + Stopper *stop.Stopper + func NewContext(ambient log.AmbientContext, baseCtx *base.Config, hlcClock *hlc.Clock, ...) *Context + func (ctx *Context) ConnHealth(target string) error + func (ctx *Context) GRPCDial(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) + func (ctx *Context) GetLocalInternalServerForAddr(target string) roachpb.InternalServer + func (ctx *Context) NewBreaker() *circuit.Breaker + func (ctx *Context) SetLocalInternalServer(internalServer roachpb.InternalServer) + type HeartbeatClient interface + Ping func(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) + func NewHeartbeatClient(cc *grpc.ClientConn) HeartbeatClient + type HeartbeatServer interface + Ping func(context.Context, *PingRequest) (*PingResponse, error) + type HeartbeatService struct + func (hs *HeartbeatService) Ping(ctx context.Context, args *PingRequest) (*PingResponse, error) + type PingRequest struct + Addr string + MaxOffsetNanos int64 + Offset RemoteOffset + Ping string + func (*PingRequest) Descriptor() ([]byte, []int) + func (*PingRequest) GetUser() string + func (*PingRequest) ProtoMessage() + func (m *PingRequest) Marshal() (dAtA []byte, err error) + func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) + func (m *PingRequest) Reset() + func (m *PingRequest) Size() (n int) + func (m *PingRequest) String() string + func (m *PingRequest) Unmarshal(dAtA []byte) error + type PingResponse struct + Pong string + ServerTime int64 + func (*PingResponse) Descriptor() ([]byte, []int) + func (*PingResponse) ProtoMessage() + func (m *PingResponse) Marshal() (dAtA []byte, err error) + func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) + func (m *PingResponse) Reset() + func (m *PingResponse) Size() (n int) + func (m *PingResponse) String() string + func (m *PingResponse) Unmarshal(dAtA []byte) error + type RemoteClockMetrics struct + ClockOffsetMeanNanos *metric.Gauge + ClockOffsetStdDevNanos *metric.Gauge + LatencyHistogramNanos *metric.Histogram + type RemoteClockMonitor struct + func (r *RemoteClockMonitor) AllLatencies() map[string]time.Duration + func (r *RemoteClockMonitor) Latency(addr string) (time.Duration, bool) + func (r *RemoteClockMonitor) Metrics() *RemoteClockMetrics + func (r *RemoteClockMonitor) UpdateOffset(ctx context.Context, addr string, offset RemoteOffset, ...) + func (r *RemoteClockMonitor) VerifyClockOffset(ctx context.Context) error + type RemoteOffset struct + MeasuredAt int64 + Offset int64 + Uncertainty int64 + func (*RemoteOffset) Descriptor() ([]byte, []int) + func (*RemoteOffset) ProtoMessage() + func (m *RemoteOffset) Marshal() (dAtA []byte, err error) + func (m *RemoteOffset) MarshalTo(dAtA []byte) (int, error) + func (m *RemoteOffset) Reset() + func (m *RemoteOffset) Size() (n int) + func (m *RemoteOffset) Unmarshal(dAtA []byte) error + func (r RemoteOffset) String() string Incompatible versions in this module v19.2.12+incompatible Jan 12, 2021