Documentation ¶
Index ¶
- type BuildInfo
- type BuildOption
- type Client
- func (c *Client) Cancel(ctx context.Context, buildID string) error
- func (c *Client) GetOutput(ctx context.Context, buildID string, w io.Writer) error
- func (c *Client) GetStatus(ctx context.Context, buildID string) (*BuildInfo, error)
- func (c *Client) GetVersion(ctx context.Context) (string, error)
- func (c *Client) Submit(ctx context.Context, definition io.Reader, opts ...BuildOption) (*BuildInfo, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildInfo ¶ added in v0.0.2
type BuildInfo struct {
// contains filtered or unexported fields
}
BuildInfo contains the details of an individual build.
func (*BuildInfo) ImageChecksum ¶ added in v0.0.2
func (*BuildInfo) IsComplete ¶ added in v0.0.2
func (*BuildInfo) LibraryRef ¶ added in v0.0.2
func (*BuildInfo) LibraryURL ¶ added in v0.0.2
type BuildOption ¶ added in v0.5.0
type BuildOption func(*buildOptions) error
func OptBuildArchitecture ¶ added in v0.5.0
func OptBuildArchitecture(arch string) BuildOption
OptBuildArchitecture sets the build architecture to arch.
func OptBuildLibraryPullBaseURL ¶ added in v0.5.0
func OptBuildLibraryPullBaseURL(libraryURL string) BuildOption
OptBuildLibraryPullBaseURL sets the base URL to pull images from when a build involves pulling one or more image(s) from a Library source.
func OptBuildLibraryRef ¶ added in v0.5.0
func OptBuildLibraryRef(imageRef string) BuildOption
OptBuildLibraryRef sets the Library image ref to push to.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client describes the client details.
func NewClient ¶
NewClient returns a Client configured according to opts.
By default, the Sylabs Build Service is used. To override this behaviour, use OptBaseURL.
By default, requests are not authenticated. To override this behaviour, use OptBearerToken.
func (*Client) Cancel ¶ added in v0.1.0
Cancel cancels an existing build. The context controls the lifetime of the request.
func (*Client) GetOutput ¶ added in v0.0.2
GetOutput streams build output for the provided buildID to w. The context controls the lifetime of the request.
func (*Client) GetStatus ¶ added in v0.0.2
GetStatus gets the status of a build from the Build Service by build ID. The context controls the lifetime of the request.
func (*Client) GetVersion ¶
GetVersion gets version information from the build service. The context controls the lifetime of the request.
func (*Client) Submit ¶ added in v0.0.2
func (c *Client) Submit(ctx context.Context, definition io.Reader, opts ...BuildOption) (*BuildInfo, error)
Submit sends a build job to the Build Service. The context controls the lifetime of the request.
By default, the built image will be pushed to an ephemeral location in the Library associated with the Remote Builder. To publish to a non-ephemeral location, consider using OptBuildLibraryRef.
By default, the image will be built for the architecture returned by runtime.GOARCH. To override this behaviour, consider using OptBuildArchitecture.
By default, if definition involves pulling one or more images from a Library reference that does not contain a hostname, they will be pulled from the Library associated with the Remote Builder. To override this behaviour, consider using OptBuildLibraryPullBaseURL.
type Option ¶ added in v0.5.0
type Option func(co *clientOptions) error
Option are used to populate co.
func OptBaseURL ¶ added in v0.5.0
OptBaseURL sets the base URL of the build server to url.
func OptBearerToken ¶ added in v0.5.0
OptBearerToken sets the bearer token to include in the "Authorization" header of each request.
func OptHTTPClient ¶ added in v0.5.0
OptHTTPClient sets the client to use to make HTTP requests.
func OptUserAgent ¶ added in v0.5.0
OptUserAgent sets the HTTP user agent to include in the "User-Agent" header of each request.