v4

package
v5.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Handler

type Handler struct {
	*v5.Handler
}

func (*Handler) NewReqHandler

func (h *Handler) NewReqHandler(req *http.Request) (ReqHandler, error)

NewReqHandler returns an instance of a *ReqHandler suitable for handling the given HTTP request. After use, the ReqHandler.Close method should be called to close it.

If no handlers are available, it returns an error with a charmstore.ErrTooManySessions cause.

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type ReqHandler

type ReqHandler struct {
	*v5.ReqHandler
}

func (ReqHandler) Close

func (h ReqHandler) Close()

Close closes the ReqHandler. This should always be called when the ReqHandler is done with.

func (ReqHandler) ResolveURL

func (h ReqHandler) ResolveURL(url *charm.URL) (*router.ResolvedURL, error)

ResolveURL implements router.Context.ResolveURL, ensuring that any resulting ResolvedURL always has a non-empty PreferredSeries field.

func (ReqHandler) ResolveURLs

func (h ReqHandler) ResolveURLs(urls []*charm.URL) ([]*router.ResolvedURL, error)

Jump to

Keyboard shortcuts

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