Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go conc #412

Merged
merged 6 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/clients.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ clients = new Mapping<String, Run> {
}
}

["go-conc"] = new {
steps = GitHubAction.Go.testSteps(null, "go-conc/go.mod")
}

["go-stdlib"] = new {
steps = GitHubAction.Go.testSteps(null, "go-stdlib/go.mod")
}
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/go-conc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated file. DO NOT EDIT.
'on':
push:
paths:
- go-conc/**
- .github/workflows/go-conc.yaml
pull_request:
paths:
- go-conc/**
- .github/workflows/go-conc.yaml
workflow_run:
workflows:
- scenario-server
types:
- completed
jobs:
test:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run == null || github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go-conc/go.mod
- run: go test ./...
defaults:
run:
working-directory: go-conc
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ docker run -it -p8080:8080 ghcr.io/jamesward/easyracer --debug
| [OCaml + Eio + Cohttp](ocaml-cohttp-eio) | 10/10 ![tests](https://github.com/jamesward/easyracer/actions/workflows/ocaml-cohttp-eio.yaml/badge.svg) | [Puneeth Chaganti](https://github.com/punchagan) | |
| [Python + AIOHTTP + TaskGroup](python-aiohttp-taskgroup) | 9/10 ![tests](https://github.com/jamesward/easyracer/actions/workflows/python-aiohttp-taskgroup.yaml/badge.svg) | [James Ward](https://github.com/jamesward) [Bruce Eckel](https://github.com/BruceEckel) | Needs Scenario 10 Impl |
| [Go](go-stdlib) | 10/10 ![tests](https://github.com/jamesward/easyracer/actions/workflows/go-stdlib.yaml/badge.svg) | [Jack Leow](https://github.com/jackgene) | |
| [Go conc](go-conc) | 10/10 ![tests](https://github.com/jamesward/easyracer/actions/workflows/go-conc.yaml/badge.svg) | [Jack Leow](https://github.com/jackgene) | |
| [Swift + Grand Central Dispatch](swift-dispatch) | 10/10 ![tests](https://github.com/jamesward/easyracer/actions/workflows/swift-dispatch.yaml/badge.svg) | [Jack Leow](https://github.com/jackgene) | |
| [Swift + async/await](swift-async) | 10/10 ![tests](https://github.com/jamesward/easyracer/actions/workflows/swift-async.yaml/badge.svg) | [Jack Leow](https://github.com/jackgene) | |
| [Swift + Combine](swift-combine) | 10/10 ![tests](https://github.com/jamesward/easyracer/actions/workflows/swift-combine.yaml/badge.svg) | [Jack Leow](https://github.com/jackgene) | |
Expand Down
16 changes: 16 additions & 0 deletions go-conc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Go conc
-------

Go implementation that uses [conc](https://github.com/sourcegraph/conc) - a library that promises "better structured concurrency for go".

It is worth noting that while conc is an improvement over plain vanilla Go, it can still be improved upon (some of that improvement, you can find in `internal/conc`), and at the end of the day, it does nothing to address the fact that Go is still Go.

Run the tests (using a Testcontainers scenario server):
```
go test ./...
```

Run against a manually started scenario server:
```
go run main.go
```
60 changes: 60 additions & 0 deletions go-conc/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
module github.com/jamesward/easyracer/go-conc

go 1.22

require (
github.com/google/uuid v1.6.0
github.com/sourcegraph/conc v0.3.0
github.com/struCoder/pidusage v0.2.1
github.com/testcontainers/testcontainers-go v0.32.0
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.11.5 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/containerd/containerd v1.7.18 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/docker v27.1.0+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/user v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/shirou/gopsutil/v3 v3.23.12 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/sys v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
Loading
Loading