Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder interface { Build(*build.Definition) error Status() []build.Status }
Builder interface describes anything that can Build() a singularity image given a build.Definition.
type Request ¶ added in v1.2.0
type Request struct { Name string Version string `json:"version,omitempty"` Model struct { Description string Packages []core.Package } }
A Request object contains all of the information required to build an environment.
type Server ¶ added in v1.6.0
type Server struct {
// contains filtered or unexported fields
}
func New ¶
New takes a Builder that will be sent a Definition when the returned Handler receives request JSON POSTed to /environments/build, and uses the Builder to get status information for builds when it receives a GET request to /environments/status. It uses the config to get your core URL, and if set will trigger the core service to resend pending builds to us after Start().
func (*Server) Start ¶ added in v1.6.0
Start starts a server using the given listener (you can get one from NewListener()). Blocks until Stop() is called, or a kill signal is received.
You should always defer Stop(), regardless of this returning an error.
If we had been configured with core details, core will be asked to resend its queued environments.
func (*Server) WaitUntilStarted ¶ added in v1.6.0
WaitUntilStarted blocks until Start() brings up a listener and the core service talks to us. Will only work if we were configured with core details and the core is working. There is a timeout; will return false if the timeout expires, or core details weren't configured.