Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDiagnosticServiceServer(s grpc.ServiceRegistrar, srv DiagnosticServiceServer)
- type DiagnosticServiceClient
- type DiagnosticServiceServer
- type PingRequest
- func (*PingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PingRequest) GetCount() int32
- func (x *PingRequest) GetHost() string
- func (x *PingRequest) GetTimeout() *durationpb.Duration
- func (*PingRequest) ProtoMessage()
- func (x *PingRequest) ProtoReflect() protoreflect.Message
- func (x *PingRequest) Reset()
- func (x *PingRequest) String() string
- type PingResponse
- func (*PingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PingResponse) GetAvgRtt() *durationpb.Duration
- func (x *PingResponse) GetMaxRtt() *durationpb.Duration
- func (x *PingResponse) GetMinRtt() *durationpb.Duration
- func (x *PingResponse) GetPacketLossPercentage() int32
- func (x *PingResponse) GetPacketsReceived() int32
- func (x *PingResponse) GetPacketsSent() int32
- func (x *PingResponse) GetPingable() bool
- func (x *PingResponse) GetPingedHost() string
- func (x *PingResponse) GetStdDevRtt() *durationpb.Duration
- func (*PingResponse) ProtoMessage()
- func (x *PingResponse) ProtoReflect() protoreflect.Message
- func (x *PingResponse) Reset()
- func (x *PingResponse) String() string
- type PortProbeRequest
- func (*PortProbeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PortProbeRequest) GetHost() string
- func (x *PortProbeRequest) GetPort() int32
- func (x *PortProbeRequest) GetTimeout() *durationpb.Duration
- func (*PortProbeRequest) ProtoMessage()
- func (x *PortProbeRequest) ProtoReflect() protoreflect.Message
- func (x *PortProbeRequest) Reset()
- func (x *PortProbeRequest) String() string
- type PortProbeResponse
- func (*PortProbeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PortProbeResponse) GetAddrProbed() string
- func (x *PortProbeResponse) GetOpen() bool
- func (*PortProbeResponse) ProtoMessage()
- func (x *PortProbeResponse) ProtoReflect() protoreflect.Message
- func (x *PortProbeResponse) Reset()
- func (x *PortProbeResponse) String() string
- type UnimplementedDiagnosticServiceServer
- type UnsafeDiagnosticServiceServer
Constants ¶
const ( DiagnosticService_Ping_FullMethodName = "/api.v1.DiagnosticService/Ping" DiagnosticService_PortProbe_FullMethodName = "/api.v1.DiagnosticService/PortProbe" )
Variables ¶
var DiagnosticService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.DiagnosticService", HandlerType: (*DiagnosticServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _DiagnosticService_Ping_Handler, }, { MethodName: "PortProbe", Handler: _DiagnosticService_PortProbe_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/diagnostic.proto", }
DiagnosticService_ServiceDesc is the grpc.ServiceDesc for DiagnosticService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_v1_diagnostic_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDiagnosticServiceServer ¶
func RegisterDiagnosticServiceServer(s grpc.ServiceRegistrar, srv DiagnosticServiceServer)
Types ¶
type DiagnosticServiceClient ¶
type DiagnosticServiceClient interface { Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) PortProbe(ctx context.Context, in *PortProbeRequest, opts ...grpc.CallOption) (*PortProbeResponse, error) }
DiagnosticServiceClient is the client API for DiagnosticService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
The diagnostic service definition.
func NewDiagnosticServiceClient ¶
func NewDiagnosticServiceClient(cc grpc.ClientConnInterface) DiagnosticServiceClient
type DiagnosticServiceServer ¶
type DiagnosticServiceServer interface { Ping(context.Context, *PingRequest) (*PingResponse, error) PortProbe(context.Context, *PortProbeRequest) (*PortProbeResponse, error) // contains filtered or unexported methods }
DiagnosticServiceServer is the server API for DiagnosticService service. All implementations must embed UnimplementedDiagnosticServiceServer for forward compatibility
The diagnostic service definition.
type PingRequest ¶
type PingRequest struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"` // contains filtered or unexported fields }
Do a ping for a given hostname
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetCount ¶
func (x *PingRequest) GetCount() int32
func (*PingRequest) GetHost ¶
func (x *PingRequest) GetHost() string
func (*PingRequest) GetTimeout ¶
func (x *PingRequest) GetTimeout() *durationpb.Duration
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct { Pingable bool `protobuf:"varint,1,opt,name=pingable,proto3" json:"pingable,omitempty"` PacketsReceived int32 `protobuf:"varint,2,opt,name=packets_received,json=packetsReceived,proto3" json:"packets_received,omitempty"` PacketsSent int32 `protobuf:"varint,3,opt,name=packets_sent,json=packetsSent,proto3" json:"packets_sent,omitempty"` PacketLossPercentage int32 `protobuf:"varint,4,opt,name=packet_loss_percentage,json=packetLossPercentage,proto3" json:"packet_loss_percentage,omitempty"` PingedHost string `protobuf:"bytes,5,opt,name=pinged_host,json=pingedHost,proto3" json:"pinged_host,omitempty"` MinRtt *durationpb.Duration `protobuf:"bytes,6,opt,name=min_rtt,json=minRtt,proto3" json:"min_rtt,omitempty"` MaxRtt *durationpb.Duration `protobuf:"bytes,7,opt,name=max_rtt,json=maxRtt,proto3" json:"max_rtt,omitempty"` AvgRtt *durationpb.Duration `protobuf:"bytes,8,opt,name=avg_rtt,json=avgRtt,proto3" json:"avg_rtt,omitempty"` StdDevRtt *durationpb.Duration `protobuf:"bytes,9,opt,name=std_dev_rtt,json=stdDevRtt,proto3" json:"std_dev_rtt,omitempty"` // contains filtered or unexported fields }
Results of the ping test
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetAvgRtt ¶
func (x *PingResponse) GetAvgRtt() *durationpb.Duration
func (*PingResponse) GetMaxRtt ¶
func (x *PingResponse) GetMaxRtt() *durationpb.Duration
func (*PingResponse) GetMinRtt ¶
func (x *PingResponse) GetMinRtt() *durationpb.Duration
func (*PingResponse) GetPacketLossPercentage ¶
func (x *PingResponse) GetPacketLossPercentage() int32
func (*PingResponse) GetPacketsReceived ¶
func (x *PingResponse) GetPacketsReceived() int32
func (*PingResponse) GetPacketsSent ¶
func (x *PingResponse) GetPacketsSent() int32
func (*PingResponse) GetPingable ¶
func (x *PingResponse) GetPingable() bool
func (*PingResponse) GetPingedHost ¶
func (x *PingResponse) GetPingedHost() string
func (*PingResponse) GetStdDevRtt ¶
func (x *PingResponse) GetStdDevRtt() *durationpb.Duration
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type PortProbeRequest ¶
type PortProbeRequest struct { // Hostname or IP Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*PortProbeRequest) Descriptor
deprecated
func (*PortProbeRequest) Descriptor() ([]byte, []int)
Deprecated: Use PortProbeRequest.ProtoReflect.Descriptor instead.
func (*PortProbeRequest) GetHost ¶
func (x *PortProbeRequest) GetHost() string
func (*PortProbeRequest) GetPort ¶
func (x *PortProbeRequest) GetPort() int32
func (*PortProbeRequest) GetTimeout ¶
func (x *PortProbeRequest) GetTimeout() *durationpb.Duration
func (*PortProbeRequest) ProtoMessage ¶
func (*PortProbeRequest) ProtoMessage()
func (*PortProbeRequest) ProtoReflect ¶
func (x *PortProbeRequest) ProtoReflect() protoreflect.Message
func (*PortProbeRequest) Reset ¶
func (x *PortProbeRequest) Reset()
func (*PortProbeRequest) String ¶
func (x *PortProbeRequest) String() string
type PortProbeResponse ¶
type PortProbeResponse struct { Open bool `protobuf:"varint,1,opt,name=open,proto3" json:"open,omitempty"` AddrProbed *string `protobuf:"bytes,2,opt,name=addr_probed,json=addrProbed,proto3,oneof" json:"addr_probed,omitempty"` // contains filtered or unexported fields }
func (*PortProbeResponse) Descriptor
deprecated
func (*PortProbeResponse) Descriptor() ([]byte, []int)
Deprecated: Use PortProbeResponse.ProtoReflect.Descriptor instead.
func (*PortProbeResponse) GetAddrProbed ¶
func (x *PortProbeResponse) GetAddrProbed() string
func (*PortProbeResponse) GetOpen ¶
func (x *PortProbeResponse) GetOpen() bool
func (*PortProbeResponse) ProtoMessage ¶
func (*PortProbeResponse) ProtoMessage()
func (*PortProbeResponse) ProtoReflect ¶
func (x *PortProbeResponse) ProtoReflect() protoreflect.Message
func (*PortProbeResponse) Reset ¶
func (x *PortProbeResponse) Reset()
func (*PortProbeResponse) String ¶
func (x *PortProbeResponse) String() string
type UnimplementedDiagnosticServiceServer ¶
type UnimplementedDiagnosticServiceServer struct { }
UnimplementedDiagnosticServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDiagnosticServiceServer) Ping ¶
func (UnimplementedDiagnosticServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
func (UnimplementedDiagnosticServiceServer) PortProbe ¶
func (UnimplementedDiagnosticServiceServer) PortProbe(context.Context, *PortProbeRequest) (*PortProbeResponse, error)
type UnsafeDiagnosticServiceServer ¶
type UnsafeDiagnosticServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDiagnosticServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DiagnosticServiceServer will result in compilation errors.