Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultUserAgent = "go-loader" DefaultIPSourceHeader = `X-Forwarded-For` DefaultPortSourceHeader = `X-Forwarded-Port` DefaultSessionLength = 35 )
global constants for file
Variables ¶
View Source
var (
DefaultEndpointList = []string{"/"}
)
Functions ¶
This section is empty.
Types ¶
type Visitor ¶
type Visitor struct { sync.Mutex // IPSourceHeader is the header to use for the IP address. Defaults to `X-Forwarded-For` IPSourceHeader string `json:"ip_source_header" mapstructure:"IP_SOURCE_HEADER"` // PortSourceHeader is the header to use for the port. Defaults to `X-Forwarded-Port` PortSourceHeader string `json:"port_source_header" mapstructure:"PORT_SOURCE_HEADER"` // SessionLength is the number of requests to make before ending the session SessionLength int `json:"session_length" mapstructure:"SESSION_LENGTH"` // TargetScheme is the scheme for URL to send the request to TargetScheme string `json:"target_scheme" mapstructure:"TARGET_SCHEME"` // TargetHost is the host for URL to send the request to TargetHost string `json:"target_host" mapstructure:"TARGET_HOST"` // Endpoints is the wordlist for the endpoint. Endpoints []string `json:"endpoint_wordlist" mapstructure:"ENDPOINTS"` // contains filtered or unexported fields }
Visitor keeps track of the configuration for a visitor.
func NewVisitor ¶
func NewVisitor() *Visitor
func (*Visitor) SetRequestWaitDistribution ¶
SetRequestWaitDistribution is how long it takes for a visitor to make a request, or the distribution of the time the visitor sleeps between requests. Must return a positive value. Values less than or equal to 0 will be set to 1.
Click to show internal directories.
Click to hide internal directories.