ping

package
Version: v0.0.0-...-c8b15d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Protocol     *pingProtocol
	MiniProtocol = protocols.NewMiniProtocol(Protocol)
)

Functions

This section is empty.

Types

type Client

type Client struct {
	protocols.Client
}

func NewClient

func NewClient(client protocols.Client) (*Client, error)

func NewClientFor

func NewClientFor(server_addr string) (*Client, error)

func (*Client) Ping

func (client *Client) Ping() error

type FaultDetector

type FaultDetector struct {
	*protocols.FaultDetectorBase
	// contains filtered or unexported fields
}

func DialNewFaultDetector

func DialNewFaultDetector(endpoint string) (*FaultDetector, error)

func NewFaultDetector

func NewFaultDetector(client protocols.Client, server string) (*FaultDetector, error)

func (*FaultDetector) Check

func (detector *FaultDetector) Check()

func (*FaultDetector) Close

func (detector *FaultDetector) Close() (err error)

func (*FaultDetector) Start

func (detector *FaultDetector) Start()

type PingPacket

type PingPacket struct {
	Value int
}

func (*PingPacket) Pong

func (ping *PingPacket) Pong() int

func (*PingPacket) PongValue

func (ping *PingPacket) PongValue() PongPacket

type PongPacket

type PongPacket struct {
	Value int
}

func (*PongPacket) Check

func (pong *PongPacket) Check(ping *PingPacket) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL