rperf

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RPerfService_RunTest_FullMethodName   = "/rperf.RPerfService/RunTest"
	RPerfService_GetStatus_FullMethodName = "/rperf.RPerfService/GetStatus"
)

Variables

View Source
var File_rperf_rperf_proto protoreflect.FileDescriptor
View Source
var RPerfService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rperf.RPerfService",
	HandlerType: (*RPerfServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RunTest",
			Handler:    _RPerfService_RunTest_Handler,
		},
		{
			MethodName: "GetStatus",
			Handler:    _RPerfService_GetStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "rperf/rperf.proto",
}

RPerfService_ServiceDesc is the grpc.ServiceDesc for RPerfService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRPerfServiceServer

func RegisterRPerfServiceServer(s grpc.ServiceRegistrar, srv RPerfServiceServer)

Types

type RPerfServiceClient

type RPerfServiceClient interface {
	// RunTest starts a network test and returns results
	RunTest(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
	// GetStatus returns the current status of the service
	GetStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}

RPerfServiceClient is the client API for RPerfService 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 RPerf service definition

type RPerfServiceServer

type RPerfServiceServer interface {
	// RunTest starts a network test and returns results
	RunTest(context.Context, *TestRequest) (*TestResponse, error)
	// GetStatus returns the current status of the service
	GetStatus(context.Context, *StatusRequest) (*StatusResponse, error)
	// contains filtered or unexported methods
}

RPerfServiceServer is the server API for RPerfService service. All implementations must embed UnimplementedRPerfServiceServer for forward compatibility.

The RPerf service definition

type StatusRequest

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

Status request (empty for now)

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Available bool   `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` // Whether the service is available
	Version   string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`      // Version information
	Message   string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`      // Additional status information
	// contains filtered or unexported fields
}

Status response with service info

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetAvailable

func (x *StatusResponse) GetAvailable() bool

func (*StatusResponse) GetMessage

func (x *StatusResponse) GetMessage() string

func (*StatusResponse) GetVersion

func (x *StatusResponse) GetVersion() string

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type TestRequest

type TestRequest struct {
	TargetAddress string  `protobuf:"bytes,1,opt,name=target_address,json=targetAddress,proto3" json:"target_address,omitempty"`   // The server to connect to
	Port          uint32  `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`                                         // The port to connect to
	Protocol      string  `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`                                  // "tcp" or "udp"
	Reverse       bool    `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`                                   // Whether to run in reverse mode
	Bandwidth     uint64  `protobuf:"varint,5,opt,name=bandwidth,proto3" json:"bandwidth,omitempty"`                               // Target bandwidth in bytes/sec
	Duration      float64 `protobuf:"fixed64,6,opt,name=duration,proto3" json:"duration,omitempty"`                                // Test duration in seconds
	Parallel      uint32  `protobuf:"varint,7,opt,name=parallel,proto3" json:"parallel,omitempty"`                                 // Number of parallel streams
	Length        uint32  `protobuf:"varint,8,opt,name=length,proto3" json:"length,omitempty"`                                     // Length of buffer to use
	Omit          uint32  `protobuf:"varint,9,opt,name=omit,proto3" json:"omit,omitempty"`                                         // Seconds to omit from the start
	NoDelay       bool    `protobuf:"varint,10,opt,name=no_delay,json=noDelay,proto3" json:"no_delay,omitempty"`                   // Use TCP no-delay option
	SendBuffer    uint32  `protobuf:"varint,11,opt,name=send_buffer,json=sendBuffer,proto3" json:"send_buffer,omitempty"`          // Socket send buffer size
	ReceiveBuffer uint32  `protobuf:"varint,12,opt,name=receive_buffer,json=receiveBuffer,proto3" json:"receive_buffer,omitempty"` // Socket receive buffer size
	SendInterval  float64 `protobuf:"fixed64,13,opt,name=send_interval,json=sendInterval,proto3" json:"send_interval,omitempty"`   // Send interval in seconds
	// contains filtered or unexported fields
}

Test request parameters

func (*TestRequest) Descriptor deprecated

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

Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.

func (*TestRequest) GetBandwidth

func (x *TestRequest) GetBandwidth() uint64

func (*TestRequest) GetDuration

func (x *TestRequest) GetDuration() float64

func (*TestRequest) GetLength

func (x *TestRequest) GetLength() uint32

func (*TestRequest) GetNoDelay

func (x *TestRequest) GetNoDelay() bool

func (*TestRequest) GetOmit

func (x *TestRequest) GetOmit() uint32

func (*TestRequest) GetParallel

func (x *TestRequest) GetParallel() uint32

func (*TestRequest) GetPort

func (x *TestRequest) GetPort() uint32

func (*TestRequest) GetProtocol

func (x *TestRequest) GetProtocol() string

func (*TestRequest) GetReceiveBuffer

func (x *TestRequest) GetReceiveBuffer() uint32

func (*TestRequest) GetReverse

func (x *TestRequest) GetReverse() bool

func (*TestRequest) GetSendBuffer

func (x *TestRequest) GetSendBuffer() uint32

func (*TestRequest) GetSendInterval

func (x *TestRequest) GetSendInterval() float64

func (*TestRequest) GetTargetAddress

func (x *TestRequest) GetTargetAddress() string

func (*TestRequest) ProtoMessage

func (*TestRequest) ProtoMessage()

func (*TestRequest) ProtoReflect

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

func (*TestRequest) Reset

func (x *TestRequest) Reset()

func (*TestRequest) String

func (x *TestRequest) String() string

type TestResponse

type TestResponse struct {
	Success     bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`                           // Whether the test completed successfully
	Error       string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`                                // Error message, if any
	ResultsJson string `protobuf:"bytes,3,opt,name=results_json,json=resultsJson,proto3" json:"results_json,omitempty"` // Full results in JSON format
	// Summary metrics
	Summary *TestSummary `protobuf:"bytes,4,opt,name=summary,proto3" json:"summary,omitempty"`
	// contains filtered or unexported fields
}

Test response with results

func (*TestResponse) Descriptor deprecated

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

Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.

func (*TestResponse) GetError

func (x *TestResponse) GetError() string

func (*TestResponse) GetResultsJson

func (x *TestResponse) GetResultsJson() string

func (*TestResponse) GetSuccess

func (x *TestResponse) GetSuccess() bool

func (*TestResponse) GetSummary

func (x *TestResponse) GetSummary() *TestSummary

func (*TestResponse) ProtoMessage

func (*TestResponse) ProtoMessage()

func (*TestResponse) ProtoReflect

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

func (*TestResponse) Reset

func (x *TestResponse) Reset()

func (*TestResponse) String

func (x *TestResponse) String() string

type TestSummary

type TestSummary struct {
	Duration      float64 `protobuf:"fixed64,1,opt,name=duration,proto3" json:"duration,omitempty"`                                  // Test duration in seconds
	BytesSent     uint64  `protobuf:"varint,2,opt,name=bytes_sent,json=bytesSent,proto3" json:"bytes_sent,omitempty"`                // Total bytes sent
	BytesReceived uint64  `protobuf:"varint,3,opt,name=bytes_received,json=bytesReceived,proto3" json:"bytes_received,omitempty"`    // Total bytes received
	BitsPerSecond float64 `protobuf:"fixed64,4,opt,name=bits_per_second,json=bitsPerSecond,proto3" json:"bits_per_second,omitempty"` // Throughput in bits per second
	// UDP-specific fields
	PacketsSent     uint64  `protobuf:"varint,5,opt,name=packets_sent,json=packetsSent,proto3" json:"packets_sent,omitempty"`             // UDP packets sent
	PacketsReceived uint64  `protobuf:"varint,6,opt,name=packets_received,json=packetsReceived,proto3" json:"packets_received,omitempty"` // UDP packets received
	PacketsLost     uint64  `protobuf:"varint,7,opt,name=packets_lost,json=packetsLost,proto3" json:"packets_lost,omitempty"`             // UDP packets lost
	LossPercent     float64 `protobuf:"fixed64,8,opt,name=loss_percent,json=lossPercent,proto3" json:"loss_percent,omitempty"`            // Packet loss percentage
	JitterMs        float64 `protobuf:"fixed64,9,opt,name=jitter_ms,json=jitterMs,proto3" json:"jitter_ms,omitempty"`                     // Jitter in milliseconds
	// contains filtered or unexported fields
}

Summary of test results

func (*TestSummary) Descriptor deprecated

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

Deprecated: Use TestSummary.ProtoReflect.Descriptor instead.

func (*TestSummary) GetBitsPerSecond

func (x *TestSummary) GetBitsPerSecond() float64

func (*TestSummary) GetBytesReceived

func (x *TestSummary) GetBytesReceived() uint64

func (*TestSummary) GetBytesSent

func (x *TestSummary) GetBytesSent() uint64

func (*TestSummary) GetDuration

func (x *TestSummary) GetDuration() float64

func (*TestSummary) GetJitterMs

func (x *TestSummary) GetJitterMs() float64

func (*TestSummary) GetLossPercent

func (x *TestSummary) GetLossPercent() float64

func (*TestSummary) GetPacketsLost

func (x *TestSummary) GetPacketsLost() uint64

func (*TestSummary) GetPacketsReceived

func (x *TestSummary) GetPacketsReceived() uint64

func (*TestSummary) GetPacketsSent

func (x *TestSummary) GetPacketsSent() uint64

func (*TestSummary) ProtoMessage

func (*TestSummary) ProtoMessage()

func (*TestSummary) ProtoReflect

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

func (*TestSummary) Reset

func (x *TestSummary) Reset()

func (*TestSummary) String

func (x *TestSummary) String() string

type UnimplementedRPerfServiceServer

type UnimplementedRPerfServiceServer struct{}

UnimplementedRPerfServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedRPerfServiceServer) GetStatus

func (UnimplementedRPerfServiceServer) RunTest

type UnsafeRPerfServiceServer

type UnsafeRPerfServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeRPerfServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RPerfServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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