Skip to content

Commit

Permalink
reorganize packages (#25)
Browse files Browse the repository at this point in the history
* reorganize packages

---------

Signed-off-by: Pablo Chacin <[email protected]>
  • Loading branch information
pablochacin authored Aug 27, 2024
1 parent a44444d commit 777ef8e
Show file tree
Hide file tree
Showing 35 changed files with 762 additions and 696 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ k6build server -e GOPROXY=http://localhost:80
## Flags

```
-f, --cache-dir string cache dir (default "/tmp/buildservice")
--cache-url string cache server url. If not specified, a local cache server is started
--cache-url string cache server url (default "http://localhost:9000")
-c, --catalog string dependencies catalog (default "catalog.json")
-g, --copy-go-env copy go environment (default true)
-e, --env stringToString build environment variables (default [])
Expand Down
95 changes: 0 additions & 95 deletions apiserver_test.go

This file was deleted.

28 changes: 2 additions & 26 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ package k6build
import (
"bytes"
"context"
"errors"
"fmt"

"github.com/grafana/k6catalog"
"github.com/grafana/k6foundry"
)

const (
k6Dep = "k6"
)
var ErrBuildFailed = errors.New("build failed") //nolint:revive

// Dependency contains the properties of a k6 dependency.
type Dependency struct {
Expand Down Expand Up @@ -60,23 +56,3 @@ type BuildService interface {
// Build returns a k6 Artifact given its dependencies and version constrain
Build(ctx context.Context, platform string, k6Constrains string, deps []Dependency) (Artifact, error)
}

// implements the BuildService interface
type localBuildSrv struct {
catalog k6catalog.Catalog
builder k6foundry.Builder
cache Cache
}

// NewBuildService creates a build service
func NewBuildService(
catalog k6catalog.Catalog,
builder k6foundry.Builder,
cache Cache,
) BuildService {
return &localBuildSrv{
catalog: catalog,
builder: builder,
cache: cache,
}
}
175 changes: 0 additions & 175 deletions cache.go

This file was deleted.

1 change: 1 addition & 0 deletions catalog.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"k6": {"module": "go.k6.io/k6", "versions": ["v0.50.0", "v0.51.0"]},
"k6/x/kubernetes": {"module": "github.com/grafana/xk6-kubernetes", "versions": ["v0.8.0","v0.9.0"]},
"k6/x/sql": {"module": "github.com/grafana/xk6-sql", "versions": ["v0.4.0"]},
"k6/x/output-kafka": {"module": "github.com/grafana/xk6-output-kafka", "versions": ["v0.7.0"]}
}
Loading

0 comments on commit 777ef8e

Please sign in to comment.