Skip to content

Commit 2f621b9

Browse files
authored
feat(worker): Provided module (#52)
1 parent 6b8db45 commit 2f621b9

34 files changed

+2935
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- "log"
3030
- "orm"
3131
- "trace"
32+
- "worker"
3233
- "fxcore"
3334
- "fxconfig"
3435
- "fxgenerate"

.github/workflows/worker-ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "worker-ci"
2+
3+
on:
4+
push:
5+
branches:
6+
- "feat**"
7+
- "fix**"
8+
- "hotfix**"
9+
- "chore**"
10+
paths:
11+
- "worker/**.go"
12+
- "worker/go.mod"
13+
- "worker/go.sum"
14+
pull_request:
15+
types:
16+
- opened
17+
- synchronize
18+
- reopened
19+
branches:
20+
- main
21+
paths:
22+
- "worker/**.go"
23+
- "worker/go.mod"
24+
- "worker/go.sum"
25+
26+
jobs:
27+
ci:
28+
uses: ./.github/workflows/common-ci.yml
29+
secrets: inherit
30+
with:
31+
module: "worker"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Yokai `modules` are the foundation of the framework.
4949
| [log](log) | Logging module based on [Zerolog](https://github.com/rs/zerolog) |
5050
| [orm](orm) | ORM module based on [Gorm](https://gorm.io/) |
5151
| [trace](trace) | Tracing module based on [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-go) |
52+
| [worker](worker) | Worker module based on [sync](https://pkg.go.dev/sync) |
5253

5354
They can also be used in any Go application (no Yokai or [Fx](https://github.com/uber-go/fx) dependencies).
5455

release-please-config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
"component": "trace",
4242
"tag-separator": "/"
4343
},
44+
"worker": {
45+
"release-type": "go",
46+
"component": "worker",
47+
"tag-separator": "/"
48+
},
4449
"fxcore": {
4550
"release-type": "go",
4651
"component": "fxcore",

worker/.golangci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
run:
2+
timeout: 5m
3+
concurrency: 8
4+
5+
linters:
6+
enable:
7+
- asasalint
8+
- asciicheck
9+
- bidichk
10+
- bodyclose
11+
- containedctx
12+
- contextcheck
13+
- cyclop
14+
- decorder
15+
- dogsled
16+
- dupl
17+
- durationcheck
18+
- errcheck
19+
- errchkjson
20+
- errname
21+
- errorlint
22+
- exhaustive
23+
- forbidigo
24+
- forcetypeassert
25+
- gocognit
26+
- goconst
27+
- gocritic
28+
- gocyclo
29+
- godot
30+
- godox
31+
- gofmt
32+
- goheader
33+
- gomoddirectives
34+
- gomodguard
35+
- goprintffuncname
36+
- gosec
37+
- gosimple
38+
- govet
39+
- grouper
40+
- importas
41+
- ineffassign
42+
- interfacebloat
43+
- logrlint
44+
- maintidx
45+
- makezero
46+
- misspell
47+
- nestif
48+
- nilerr
49+
- nilnil
50+
- nlreturn
51+
- nolintlint
52+
- nosprintfhostport
53+
- prealloc
54+
- predeclared
55+
- promlinter
56+
- reassign
57+
- staticcheck
58+
- tenv
59+
- thelper
60+
- tparallel
61+
- typecheck
62+
- unconvert
63+
- unparam
64+
- unused
65+
- usestdlibvars
66+
- whitespace

0 commit comments

Comments
 (0)