Documentation ¶
Overview ¶
Package client implements a client for a build service
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidConfiguration = errors.New("invalid configuration")
ErrInvalidConfiguration signals an error in the configuration
Functions ¶
func NewBuildServiceClient ¶
func NewBuildServiceClient(config BuildServiceClientConfig) (k6build.BuildService, error)
NewBuildServiceClient returns a new client for a remote build service
Types ¶
type BuildClient ¶
type BuildClient struct {
// contains filtered or unexported fields
}
BuildClient defines a client of a build service
func (*BuildClient) Build ¶
func (r *BuildClient) Build( ctx context.Context, platform string, k6Constrains string, deps []k6build.Dependency, ) (k6build.Artifact, error)
Build request building an artifact to a build service The build service is expected to return a k6build.Artifact In case of error, the returned error is expected to match any of the errors defined in the api package and calling errors.Unwrap(err) will provide the cause, if available.
type BuildServiceClientConfig ¶
type BuildServiceClientConfig struct { // URL to build service URL string // Authorization credentials passed in the Authorization: <type> <credentials> header // See AuthorizationType Authorization string // AuthorizationType type of credentials in the Authorization: <type> <credentials> header // For example, "Bearer", "Token", "Basic". Defaults to "Bearer" AuthorizationType string // Headers custom request headers Headers map[string]string }
BuildServiceClientConfig defines the configuration for accessing a remote build service
Click to show internal directories.
Click to hide internal directories.