push

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2017 License: Apache-2.0 Imports: 7 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
	Root  http.FileSystem
}

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