ping

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_ping_proto protoreflect.FileDescriptor

Functions

func NewPingEndpoints

func NewPingEndpoints() []*api.Endpoint

func RegisterPingHandler

func RegisterPingHandler(s server.Server, hdlr PingHandler, opts ...server.HandlerOption) error

Types

type IpRequest

type IpRequest struct {

	// address to ping
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Ping an IP address

func (*IpRequest) Descriptor deprecated

func (*IpRequest) Descriptor() ([]byte, []int)

Deprecated: Use IpRequest.ProtoReflect.Descriptor instead.

func (*IpRequest) GetAddress

func (x *IpRequest) GetAddress() string

func (*IpRequest) ProtoMessage

func (*IpRequest) ProtoMessage()

func (*IpRequest) ProtoReflect

func (x *IpRequest) ProtoReflect() protoreflect.Message

func (*IpRequest) Reset

func (x *IpRequest) Reset()

func (*IpRequest) String

func (x *IpRequest) String() string

type IpResponse

type IpResponse struct {

	// response status
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// average latency e.g 10ms
	Latency string `protobuf:"bytes,2,opt,name=latency,proto3" json:"latency,omitempty"`
	// contains filtered or unexported fields
}

func (*IpResponse) Descriptor deprecated

func (*IpResponse) Descriptor() ([]byte, []int)

Deprecated: Use IpResponse.ProtoReflect.Descriptor instead.

func (*IpResponse) GetLatency

func (x *IpResponse) GetLatency() string

func (*IpResponse) GetStatus

func (x *IpResponse) GetStatus() string

func (*IpResponse) ProtoMessage

func (*IpResponse) ProtoMessage()

func (*IpResponse) ProtoReflect

func (x *IpResponse) ProtoReflect() protoreflect.Message

func (*IpResponse) Reset

func (x *IpResponse) Reset()

func (*IpResponse) String

func (x *IpResponse) String() string

type PingService

type PingService interface {
	Ip(ctx context.Context, in *IpRequest, opts ...client.CallOption) (*IpResponse, error)
	Url(ctx context.Context, in *UrlRequest, opts ...client.CallOption) (*UrlResponse, error)
	Tcp(ctx context.Context, in *TcpRequest, opts ...client.CallOption) (*TcpResponse, error)
}

func NewPingService

func NewPingService(name string, c client.Client) PingService

type TcpRequest

type TcpRequest struct {

	// address to dial
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// optional data to send
	Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Ping a TCP port is open

func (*TcpRequest) Descriptor deprecated

func (*TcpRequest) Descriptor() ([]byte, []int)

Deprecated: Use TcpRequest.ProtoReflect.Descriptor instead.

func (*TcpRequest) GetAddress

func (x *TcpRequest) GetAddress() string

func (*TcpRequest) GetData

func (x *TcpRequest) GetData() string

func (*TcpRequest) ProtoMessage

func (*TcpRequest) ProtoMessage()

func (*TcpRequest) ProtoReflect

func (x *TcpRequest) ProtoReflect() protoreflect.Message

func (*TcpRequest) Reset

func (x *TcpRequest) Reset()

func (*TcpRequest) String

func (x *TcpRequest) String() string

type TcpResponse

type TcpResponse struct {

	// response status
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// response data if any
	Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*TcpResponse) Descriptor deprecated

func (*TcpResponse) Descriptor() ([]byte, []int)

Deprecated: Use TcpResponse.ProtoReflect.Descriptor instead.

func (*TcpResponse) GetData

func (x *TcpResponse) GetData() string

func (*TcpResponse) GetStatus

func (x *TcpResponse) GetStatus() string

func (*TcpResponse) ProtoMessage

func (*TcpResponse) ProtoMessage()

func (*TcpResponse) ProtoReflect

func (x *TcpResponse) ProtoReflect() protoreflect.Message

func (*TcpResponse) Reset

func (x *TcpResponse) Reset()

func (*TcpResponse) String

func (x *TcpResponse) String() string

type UrlRequest

type UrlRequest struct {

	// address to use
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// method of the call
	Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	// contains filtered or unexported fields
}

Ping a HTTP URL

func (*UrlRequest) Descriptor deprecated

func (*UrlRequest) Descriptor() ([]byte, []int)

Deprecated: Use UrlRequest.ProtoReflect.Descriptor instead.

func (*UrlRequest) GetAddress

func (x *UrlRequest) GetAddress() string

func (*UrlRequest) GetMethod

func (x *UrlRequest) GetMethod() string

func (*UrlRequest) ProtoMessage

func (*UrlRequest) ProtoMessage()

func (*UrlRequest) ProtoReflect

func (x *UrlRequest) ProtoReflect() protoreflect.Message

func (*UrlRequest) Reset

func (x *UrlRequest) Reset()

func (*UrlRequest) String

func (x *UrlRequest) String() string

type UrlResponse

type UrlResponse struct {

	// the response status
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// the response code
	Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*UrlResponse) Descriptor deprecated

func (*UrlResponse) Descriptor() ([]byte, []int)

Deprecated: Use UrlResponse.ProtoReflect.Descriptor instead.

func (*UrlResponse) GetCode

func (x *UrlResponse) GetCode() int32

func (*UrlResponse) GetStatus

func (x *UrlResponse) GetStatus() string

func (*UrlResponse) ProtoMessage

func (*UrlResponse) ProtoMessage()

func (*UrlResponse) ProtoReflect

func (x *UrlResponse) ProtoReflect() protoreflect.Message

func (*UrlResponse) Reset

func (x *UrlResponse) Reset()

func (*UrlResponse) String

func (x *UrlResponse) String() string

Jump to

Keyboard shortcuts

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