http

package
v0.0.0-...-99f3a87 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2014 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

HTTP transport for jobs.

Serve jobs over the http protocol, and provide a marshalling interface for the core geard jobs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContentTypeDoesNotMatch = jobs.SimpleError{jobs.ResponseNotAcceptable, "The content type you requested is not available for this action."}
)

Functions

func AddHttpExtension

func AddHttpExtension(extension HttpExtension)

Register an extension to this server during init() or startup

func NewHttpJobResponse

func NewHttpJobResponse(w http.ResponseWriter, skipStreaming bool, mode client.ResponseContentMode) jobs.Response

Types

type ExtensionMap

type ExtensionMap map[client.RemoteJob]JobHandler

type HeaderSerialization

type HeaderSerialization interface {
	ToHeader() string
}

type HttpConfiguration

type HttpConfiguration struct {
	Docker     config.DockerConfiguration
	Dispatcher *dispatcher.Dispatcher
}

func (*HttpConfiguration) Handler

func (conf *HttpConfiguration) Handler() (http.Handler, error)

type HttpContext

type HttpContext struct {
	jobs.JobContext
	ApiVersion string
}

type HttpExtension

type HttpExtension interface {
	Routes() ExtensionMap
	HttpJobFor(request interface{}) (client.RemoteExecutable, error)
}

type JobHandler

type JobHandler func(*HttpConfiguration, *HttpContext, *rest.Request) (interface{}, error)

type StringHeader

type StringHeader string

func (StringHeader) ToHeader

func (s StringHeader) ToHeader() string

type TabularOutput

type TabularOutput interface {
	WriteTableTo(io.Writer) error
}

Directories

Path Synopsis
Provides remote execution of jobs via the http transport.
Provides remote execution of jobs via the http transport.
Provides the gear daemon's http API with and without encrypted token support.
Provides the gear daemon's http API with and without encrypted token support.

Jump to

Keyboard shortcuts

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