This section is empty.


View Source
var (
	// UDPURLPrefix is the URL prefix for triggering udp load.
	UDPURLPrefix = "udp://"
	// UDPStatusOK is the map key on success.
	UDPStatusOK = "OK"
View Source
var UDPTimeOutDefaultValue = 750 * time.Millisecond


This section is empty.


type RunnerOptions

type RunnerOptions struct {
	UDPOptions // Need to call Init() to initialize

    RunnerOptions includes the base RunnerOptions plus udp specific options.

    type RunnerResults

    type RunnerResults struct {
    	RetCodes      UDPResultMap
    	SocketCount   int
    	BytesSent     int64
    	BytesReceived int64
    	// contains filtered or unexported fields

      RunnerResults is the aggregated result of an UDPRunner. Also is the internal type used per thread/goroutine.

      func RunUDPTest

      func RunUDPTest(o *RunnerOptions) (*RunnerResults, error)

        RunUDPTest runs an udp test and returns the aggregated stats. Some refactoring to avoid copy-pasta between the now 3 runners would be good.

        func (*RunnerResults) Run

        func (udpstate *RunnerResults) Run(t int)

          Run tests udp request fetching. Main call being run at the target QPS. To be set as the Function in RunnerOptions.

          type UDPClient

          type UDPClient struct {
          	// contains filtered or unexported fields

            UDPClient is the client used for udp echo testing.

            func NewUDPClient

            func NewUDPClient(o *UDPOptions) (*UDPClient, error)

              NewUDPClient creates and initialize and returns a client based on the UDPOptions.

              func (*UDPClient) Close

              func (c *UDPClient) Close() int

                Close closes the last connection and returns the total number of sockets used for the run.

                func (*UDPClient) Fetch

                func (c *UDPClient) Fetch() ([]byte, error)

                type UDPOptions

                type UDPOptions struct {
                	Destination string
                	Payload     []byte // what to send (and check)
                	ReqTimeout  time.Duration

                  UDPOptions are options to the UDPClient.

                  type UDPResultMap

                  type UDPResultMap map[string]int64

                  Source Files