deliverer

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deliverer

type Deliverer interface {
	Deliver(req *Request) (res *Response)
}

type HTTPDeliverer

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

HTTPDeliverer delivers via HTTP

func NewHTTPDeliverer

func NewHTTPDeliverer(cfg *config.WorkerDeliverer) *HTTPDeliverer

func (*HTTPDeliverer) Deliver

func (d *HTTPDeliverer) Deliver(req *Request) (res *Response)

type Request

type Request struct {
	Request *http.Request
	URL     string
	Method  string
	Payload []byte
	Headers map[string]string
	Timeout time.Duration
}

type Response

type Response struct {
	Request      *Request
	StatusCode   int
	Header       http.Header
	ResponseBody []byte
	Error        error
	Latancy      time.Duration
}

func (*Response) Is2xx

func (r *Response) Is2xx() bool

func (*Response) String

func (r *Response) String() string

Jump to

Keyboard shortcuts

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