rest

package
v1.1.0-alpha.0....-8bd9592 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2015 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package rest has generic implementations of resources used for REST responses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocationStreamer

type LocationStreamer struct {
	Location    *url.URL
	Transport   http.RoundTripper
	ContentType string
	Flush       bool
}

LocationStreamer is a resource that streams the contents of a particular location URL

func (*LocationStreamer) InputStream

func (s *LocationStreamer) InputStream(apiVersion, acceptHeader string) (stream io.ReadCloser, flush bool, contentType string, err error)

InputStream returns a stream with the contents of the URL location. If no location is provided, a null stream is returned.

func (*LocationStreamer) IsAnAPIObject

func (*LocationStreamer) IsAnAPIObject()

IsAnAPIObject marks this object as a runtime.Object

type UpgradeAwareProxyHandler

type UpgradeAwareProxyHandler struct {
	UpgradeRequired bool
	Location        *url.URL
	Transport       http.RoundTripper
	FlushInterval   time.Duration
	MaxBytesPerSec  int64
	// contains filtered or unexported fields
}

UpgradeAwareProxyHandler is a handler for proxy requests that may require an upgrade

func NewUpgradeAwareProxyHandler

func NewUpgradeAwareProxyHandler(location *url.URL, transport http.RoundTripper, upgradeRequired bool) *UpgradeAwareProxyHandler

NewUpgradeAwareProxyHandler creates a new proxy handler with a default flush interval

func (*UpgradeAwareProxyHandler) RequestError

func (h *UpgradeAwareProxyHandler) RequestError() error

RequestError returns an error that occurred while handling request

func (*UpgradeAwareProxyHandler) ServeHTTP

ServeHTTP handles the proxy request

Jump to

Keyboard shortcuts

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