simple

package
v0.0.0-...-34ba797 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2015 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Upstream

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

Upstream is a basic HTTP upstream implementation.

func New

func New(url *url.URL) *Upstream

New returns a configured and ready to use Upstream instance.

func (*Upstream) GetHeader

func (u *Upstream) GetHeader(pathStr string) (*http.Response, error)

GetHeader retrieves the headers for the specified path from the upstream server.

func (*Upstream) GetRequest

func (u *Upstream) GetRequest(pathStr string) (*http.Response, error)

GetRequest executes a simple GET HTTP request to the upstream server.

func (*Upstream) GetRequestPartial

func (u *Upstream) GetRequestPartial(pathStr string, start, end uint64) (*http.Response, error)

GetRequestPartial executes a GET HTTP request to the upstream server with a range header, specified by stand and end.

func (*Upstream) GetSize

func (u *Upstream) GetSize(pathStr string) (int64, error)

GetSize retrieves the file size of the specified path from the upstream server.

func (*Upstream) Head

func (u *Upstream) Head(pathStr string) (*http.Response, error)

Head executes a HEAD HTTP request to the upstream server.

Jump to

Keyboard shortcuts

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