Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hooks ¶
type Hooks struct {
LoadConfig func(Context) (config.JobRunner, error)
// RunAPI runs the Job Runner API. It should block until the API is stopped
// via a call to StopAPI. If this hook is provided, it is called instead of
// api.Run, and StopAPI must be provided as well.
RunAPI func() error
// StopAPI stops running the Job Runner API. It's called when the server is
// stopped, and it should cause RunAPI to return. If this hook is provided, it
// is called instead of api.Stop, and RunAPI must be provided as well.
StopAPI func() error
// ServerURL returns the base URL to be used for querying this Job Runner's API.
// This URL is returned to the Request Manager when a job chain is run, so the
// Request Manager may direct status/stop queries for the request to the
// correct Job Runner instance. The default ServerURL hook must be overriden if
// a Addr (and TLS config) is not provided in the Job Runner config
// file. This is typical if a RunAPI hook has been provided, as Addr
// and TLS config files are used only in the default api.Run.
ServerURL func(Context) (string, error)
}
Click to show internal directories.
Click to hide internal directories.