ping

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPingTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a ping client

func NewClient

func NewClient(logger *logger.Logger, grpcConn *grpc.ClientConn, clientID string) *Client

NewClient creates a new ping client

func (*Client) IsReady

func (p *Client) IsReady() bool

IsReady returns true if the ping client is ready to send pings

func (*Client) SendPingWithTimeout

func (p *Client) SendPingWithTimeout(timeout time.Duration) (*client.PingResponse, error)

SendPingWithTimeout sends a ping request with custom timeout

func (*Client) UpdateConnection

func (p *Client) UpdateConnection(grpcConn *grpc.ClientConn, clientID string)

UpdateConnection updates the gRPC connection and client ID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL