Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { Path string NumConns int Rate int Verbose bool Results *results.Results // contains filtered or unexported fields }
Connector contains connector data.
func (Connector) New ¶
New generates a new Connector with all the necessaries.
Example ¶
go stubServer() c := Connector{}.New("http://localhost:9877", 10) // // Note on Rate: // // If Rate is not zero, Run() will parallelize actions at a Rate (QPS) // of the set value. // // If Rate is zero, Run() will run the connections in a series. // // Both c.Series() and c.Parallel() can also be called in place of Run(). // c.Rate = 4 // QPS c.Run() for i, code := range c.Results.Code { fmt.Printf("Code[%d] = %d\n", i, code) }
Output:
func (*Connector) Parallel ¶
func (conn *Connector) Parallel()
Parallel runs the Connector parallelized.
Click to show internal directories.
Click to hide internal directories.