Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScenarioService ¶
type ScenarioService struct {
// contains filtered or unexported fields
}
ScenarioService encapsulates proxy/scenario/requester information and runs the scenario.
func NewScenarioService ¶
func NewScenarioService() *ScenarioService
NewScenarioService is the constructor of the ScenarioService.
func (*ScenarioService) Do ¶
func (s *ScenarioService) Do(proxy *url.URL) (response *types.Response, err *types.RequestError)
Do executes the scenario for the given proxy. Returns "types.Response" filled by the requester of the given Proxy Returns error only if types.Response.Err.Type is types.ErrorProxy or types.ErrorIntented
func (*ScenarioService) Init ¶
func (s *ScenarioService) Init(ctx context.Context, scenario types.Scenario, proxies []*url.URL) (err error)
Init initializes the ScenarioService.clients with the given types.Scenario and proxies. Passes the given ctx to the underlying requestor so we are able to control to the life of each request.
Click to show internal directories.
Click to hide internal directories.