Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Protocol *heartbeatProtocol MiniProtocol = protocols.NewMiniProtocol(Protocol) )
Functions ¶
func RegisterServerHandler ¶
func RegisterServerHandler(server *protocols.Server, handler HeartbeatServerHandler) error
Types ¶
type Client ¶
func NewClientFor ¶
type HeartbeatFaultDetector ¶
type HeartbeatFaultDetector struct { *protocols.FaultDetectorBase // contains filtered or unexported fields }
func (*HeartbeatFaultDetector) Check ¶
func (detector *HeartbeatFaultDetector) Check()
func (*HeartbeatFaultDetector) Close ¶
func (detector *HeartbeatFaultDetector) Close() error
func (*HeartbeatFaultDetector) IsStopped ¶
func (detector *HeartbeatFaultDetector) IsStopped() bool
func (*HeartbeatFaultDetector) Start ¶
func (detector *HeartbeatFaultDetector) Start()
func (*HeartbeatFaultDetector) String ¶
func (detector *HeartbeatFaultDetector) String() string
type HeartbeatPacket ¶
type HeartbeatServer ¶
func NewHeartbeatServer ¶
func NewHeartbeatServer(local_addr string) (*HeartbeatServer, error)
func (*HeartbeatServer) HeartbeatReceived ¶
func (server *HeartbeatServer) HeartbeatReceived(beat *HeartbeatPacket)
func (*HeartbeatServer) ObserveServer ¶
func (server *HeartbeatServer) ObserveServer(endpoint string, heartbeatFrequency time.Duration, acceptableTimeout time.Duration) (protocols.FaultDetector, error)
type HeartbeatServerHandler ¶
type HeartbeatServerHandler interface {
HeartbeatReceived(beat *HeartbeatPacket)
}
Click to show internal directories.
Click to hide internal directories.