Documentation
¶
Overview ¶
Package builder is a generated GoMock package.
Index ¶
- Variables
- func GOROOT() (string, error)
- func IsBuildError(err error) bool
- func LookupEnv(ctx context.Context, varName string) (string, error)
- type BuildEnvironmentConfig
- type BuildError
- type BuildService
- type Cleaner
- type CleanupDispatchService
- type CommandRunner
- type MockCommandRunner
- type MockCommandRunnerMockRecorder
- type OSCommandRunner
- type Result
Constants ¶
This section is empty.
Variables ¶
var ErrUndefinedEnvVariable = errors.New("environment variable is undefined or empty")
ErrUndefinedEnvVariable occurs when requested environment variable is undefined or empty
Functions ¶
func GOROOT ¶
GOROOT returns host GOROOT variable from OS environment vars or from Go tool environment.
func IsBuildError ¶
Types ¶
type BuildEnvironmentConfig ¶
type BuildEnvironmentConfig struct { // IncludedEnvironmentVariables is a list included environment variables for build. IncludedEnvironmentVariables osutil.EnvironmentVariables // KeepGoModCache disables Go modules cache cleanup. KeepGoModCache bool }
BuildEnvironmentConfig is BuildService environment configuration.
type BuildError ¶
type BuildError struct {
// contains filtered or unexported fields
}
BuildError is build error
type BuildService ¶
type BuildService struct {
// contains filtered or unexported fields
}
BuildService is WASM build service
func NewBuildService ¶
func NewBuildService(log *zap.Logger, cfg BuildEnvironmentConfig, store storage.StoreProvider) BuildService
NewBuildService is BuildService constructor
func (BuildService) Clean ¶
func (s BuildService) Clean(ctx context.Context) error
Clean implements' builder.Cleaner interface.
Cleans go build and modules cache.
func (BuildService) CleanJobName ¶
func (s BuildService) CleanJobName() string
CleanJobName implements' builder.Cleaner interface.
func (BuildService) GetArtifact ¶
func (s BuildService) GetArtifact(id storage.ArtifactID) (storage.ReadCloseSizer, error)
GetArtifact returns artifact by id
type CleanupDispatchService ¶
type CleanupDispatchService struct {
// contains filtered or unexported fields
}
CleanupDispatchService calls cleanup entries after periodical interval of time.
func (*CleanupDispatchService) Start ¶
func (c *CleanupDispatchService) Start(ctx context.Context)
type CommandRunner ¶
CommandRunner is abstract command cmdRunner.
type MockCommandRunner ¶
type MockCommandRunner struct {
// contains filtered or unexported fields
}
MockCommandRunner is a mock of CommandRunner interface.
func NewMockCommandRunner ¶
func NewMockCommandRunner(ctrl *gomock.Controller) *MockCommandRunner
NewMockCommandRunner creates a new mock instance.
func (*MockCommandRunner) EXPECT ¶
func (m *MockCommandRunner) EXPECT() *MockCommandRunnerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCommandRunner) RunCommand ¶
func (m *MockCommandRunner) RunCommand(arg0 *exec.Cmd) error
RunCommand mocks base method.
type MockCommandRunnerMockRecorder ¶
type MockCommandRunnerMockRecorder struct {
// contains filtered or unexported fields
}
MockCommandRunnerMockRecorder is the mock recorder for MockCommandRunner.
func (*MockCommandRunnerMockRecorder) RunCommand ¶
func (mr *MockCommandRunnerMockRecorder) RunCommand(arg0 any) *gomock.Call
RunCommand indicates an expected call of RunCommand.
type OSCommandRunner ¶
type OSCommandRunner struct{}
func (OSCommandRunner) RunCommand ¶
func (OSCommandRunner) RunCommand(cmd *exec.Cmd) error
type Result ¶
type Result struct { // FileName is artifact file name FileName string // IsTest indicates whether binary is a test file IsTest bool // HasBenchmark indicates whether test contains benchmarks. HasBenchmark bool // HasFuzz indicates whether test has fuzzing tests. HasFuzz bool }
Result is WASM build result