Documentation ¶
Overview ¶
Provides remote execution of jobs via the http transport.
Index ¶
- Constants
- func AddHttpExtension(extension HttpExtension)
- func Inline(s string, with ...string) string
- type DefaultRequest
- func (h *DefaultRequest) HttpApiVersion() string
- func (h *DefaultRequest) MarshalHttpRequestBody(w io.Writer) error
- func (h *DefaultRequest) MarshalRequestIdentifier() jobs.RequestIdentifier
- func (h *DefaultRequest) MarshalUrlQuery(query *url.Values)
- func (h *DefaultRequest) SetServer(server string)
- func (h *DefaultRequest) Streamable() bool
- func (h *DefaultRequest) UnmarshalHttpResponse(headers http.Header, r io.Reader, mode ResponseContentMode) (interface{}, error)
- type HttpClient
- type HttpExtension
- type HttpFailureResponse
- type HttpStreamable
- type HttpTransport
- type RemoteExecutable
- type RemoteJob
- type RemoteLocator
- type ResponseContentMode
- type ServerAware
Constants ¶
View Source
const DefaultHttpPort = "43273"
Variables ¶
This section is empty.
Functions ¶
func AddHttpExtension ¶
func AddHttpExtension(extension HttpExtension)
Register an extension to this server during init() or startup
Types ¶
type DefaultRequest ¶
type DefaultRequest struct {
Server string `json:"-"`
}
func (*DefaultRequest) HttpApiVersion ¶
func (h *DefaultRequest) HttpApiVersion() string
func (*DefaultRequest) MarshalHttpRequestBody ¶
func (h *DefaultRequest) MarshalHttpRequestBody(w io.Writer) error
func (*DefaultRequest) MarshalRequestIdentifier ¶
func (h *DefaultRequest) MarshalRequestIdentifier() jobs.RequestIdentifier
func (*DefaultRequest) MarshalUrlQuery ¶
func (h *DefaultRequest) MarshalUrlQuery(query *url.Values)
func (*DefaultRequest) SetServer ¶
func (h *DefaultRequest) SetServer(server string)
func (*DefaultRequest) Streamable ¶
func (h *DefaultRequest) Streamable() bool
func (*DefaultRequest) UnmarshalHttpResponse ¶
func (h *DefaultRequest) UnmarshalHttpResponse(headers http.Header, r io.Reader, mode ResponseContentMode) (interface{}, error)
type HttpClient ¶
func (*HttpClient) ExecuteRemote ¶
func (h *HttpClient) ExecuteRemote(baseUrl *url.URL, job RemoteExecutable, res jobs.Response) error
type HttpExtension ¶
type HttpExtension interface {
HttpJobFor(request interface{}) (RemoteExecutable, error)
}
type HttpFailureResponse ¶
type HttpStreamable ¶
type HttpStreamable interface {
Streamable() bool
}
type HttpTransport ¶
type HttpTransport struct {
HttpClient
}
func (*HttpTransport) LocatorFor ¶
func (h *HttpTransport) LocatorFor(value string) (transport.Locator, error)
func (*HttpTransport) RemoteJobFor ¶
type RemoteExecutable ¶
type RemoteExecutable interface { RemoteJob MarshalRequestIdentifier() jobs.RequestIdentifier MarshalUrlQuery(*url.Values) MarshalHttpRequestBody(io.Writer) error UnmarshalHttpResponse(headers http.Header, r io.Reader, mode ResponseContentMode) (interface{}, error) }
func HttpJobFor ¶
func HttpJobFor(job interface{}) (exc RemoteExecutable, err error)
type RemoteLocator ¶
type ResponseContentMode ¶
type ResponseContentMode int
const ( ResponseJson ResponseContentMode = iota ResponseTable )
type ServerAware ¶
type ServerAware interface {
SetServer(string)
}
Click to show internal directories.
Click to hide internal directories.