push

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 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
	Root  http.FileSystem
	// contains filtered or unexported fields
}

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