http

package
v0.0.0-...-eaa370e Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2015 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// default values
	DEFAULT_HEADERS = map[string]interface{}{}
	DEFAULT_PARAMS  = map[string]interface{}{}
)

Functions

func HttpFactory

func HttpFactory() worker.Worker

HttpFactory initilize and returns a new Worker of type std_http

Types

type Http

type Http struct {
	// contains filtered or unexported fields
}

Http a worker that makes std_http requests to external APIs

func NewHttp

func NewHttp() *Http

Newstd_http initializes and returns a new std_http Worker

func (*Http) ConfigStruct

func (h *Http) ConfigStruct() interface{}

func (*Http) Init

func (h *Http) Init(i interface{}) error

func (*Http) Kill

func (h *Http) Kill() error

Kill kill the current process

func (*Http) Recycle

func (h *Http) Recycle()

Recycle prepare this worker for it's next job

func (*Http) Work

func (h *Http) Work(j job.Job) *job.JobStats

Work perform an std_http request spesified by the given job

type HttpConfig

type HttpConfig struct{}

HttpConfig provides config options for an http worker

type HttpParams

type HttpParams struct {
	Body      json.RawMessage        `json:"body"`
	Headers   map[string]interface{} `json:"headers"`
	Url       string                 `json:"url"`
	Method    string                 `json:"method"`
	UrlParams map[string]interface{} `jons:"url_params"`
}

HttpParams provides params for an http worker

Jump to

Keyboard shortcuts

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