pythia

package
v0.0.0-...-e07129c Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Version = `0.0.1`

Version is the current version of pythia

Variables

This section is empty.

Functions

func DumpRequest

func DumpRequest(req *retryablehttp.Request) (string, error)

DumpRequest to string

func DumpResponse

func DumpResponse(resp *http.Response) (string, error)

DumpResponse to string

Types

type Options

type Options struct {
	Retries   int
	Threads   int
	Timeout   int
	InputFile string
	Silent    bool
	Version   bool
	Verbose   bool
	NoColor   bool
	URL       string
}

Options contains configuration options for chaos client.

func GetOptions

func GetOptions() *Options

func ParseOptions

func ParseOptions() *Options

ParseOptions parses the command line options for application

type Pythia

type Pythia struct {
	Options *Options
	// contains filtered or unexported fields
}

HTTPX represent an instance of the library client

func New

func New(options *Options) (*Pythia, error)

New httpx instance

func (*Pythia) Do

func (py *Pythia) Do(req *retryablehttp.Request) (*Response, error)

Do http request

func (*Pythia) NewRequest

func (h *Pythia) NewRequest(method, URL string) (req *retryablehttp.Request, err error)

NewRequest from url

type Response

type Response struct {
	StatusCode    int
	Headers       map[string][]string
	Data          []byte
	ContentLength int
	Raw           string
	Words         int
	Lines         int
	Body          string
}

Response contains the response to a server

Jump to

Keyboard shortcuts

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