push

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Next  httpserver.Handler
	Rules []Rule
}

Middleware supports pushing resources to clients

func (Middleware) ServeHTTP

func (h Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)

type Resource

type Resource struct {
	Path   string
	Method string
	Header http.Header
}

Resource describes resource to be pushed

type Rule

type Rule struct {
	Path      string
	Resources []Resource
}

Rule describes conditions on which resources will be pushed

Jump to

Keyboard shortcuts

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