net

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheQuery

func CacheQuery(url string) (*goquery.Document, error)

func Hash

func Hash(url string) string

func QueryGet

func QueryGet(url string) (*goquery.Document, error)

QueryGet ...

func RegisterProxy

func RegisterProxy(addr string, args ...ProxyArgs) (e error)

RegisterProxy ...

func Request

func Request(r *http.Request) (*http.Response, error)

Types

type Cache

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

Cache ...

func NewCache

func NewCache(tmp string) *Cache

NewCache ...

func (*Cache) Cache

func (c *Cache) Cache(closer io.ReadCloser, name string) (io.ReadCloser, error)

func (*Cache) Get

func (c *Cache) Get(url string) (e error)

Get ...

func (*Cache) Reader

func (c *Cache) Reader(url string) (reader io.ReadCloser, e error)

func (*Cache) Save

func (c *Cache) Save(url string, to string) (written int64, e error)

Save ...

type ProxyArgs

type ProxyArgs func(cli *http.Client)

func TimeOut

func TimeOut(sec int) ProxyArgs

Jump to

Keyboard shortcuts

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