Skip to content

Commit 2006d0c

Browse files
Copilotintel352Copilot
authored
Add Cache, Scheduler, and EventBus modules for enhanced application capabilities (#6)
* Initial plan for issue * Implement cache module with memory storage Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Implement scheduler module with job management Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Implement eventbus module with pub/sub messaging Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Address code review feedback and fix linting issues Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Add go.mod files for cache, eventbus, and scheduler modules - Created independent go.mod files for modules/cache, modules/eventbus, and modules/scheduler - Ran go mod tidy on all modules to resolve dependencies - Applied go fmt formatting to all module files - All tests are now passing for individual modules - Fixed module structure to work as independent packages * Tests passing, readmes updated. * Implement scheduler job persistence functionality Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix module compatibility issues Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Verify module compatibility and tests Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Update module Go version and modular dependency Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Correcting versions * Fixing failing test * Missed changes * Tests and linting all passing * Update feeders/affixed_env.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove unused ConfigProvider parameter from updateConfig function Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Mod tidy --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> Co-authored-by: Jonathan Langevin <codingsloth@pm.me> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 92cd148 commit 2006d0c

97 files changed

Lines changed: 8789 additions & 704 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ go.work.sum
2525
.env
2626
.idea
2727
.DS_Store
28+
.vscode/settings.json

.golangci.yml

Lines changed: 107 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,116 @@
11
version: "2"
2+
run:
3+
timeout: 5m
4+
issues-exit-code: 1
5+
tests: true
6+
modules-download-mode: readonly
7+
8+
output:
9+
formats:
10+
- format: colored-line-number
11+
print-issued-lines: true
12+
print-linter-name: true
13+
sort-results: true
14+
15+
linters-settings:
16+
govet:
17+
enable:
18+
- shadow
19+
gocyclo:
20+
min-complexity: 15
21+
dupl:
22+
threshold: 100
23+
goconst:
24+
min-len: 2
25+
min-occurrences: 3
26+
misspell:
27+
locale: US
28+
lll:
29+
line-length: 140
30+
goimports:
31+
local-prefixes: github.com/GoCodeAlone/modular
32+
gocritic:
33+
enabled-tags:
34+
- diagnostic
35+
- experimental
36+
- opinionated
37+
- performance
38+
- style
39+
disabled-checks:
40+
- dupImport
41+
- ifElseChain
42+
- octalLiteral
43+
- whyNoLint
44+
funlen:
45+
lines: 100
46+
statements: 50
47+
depguard:
48+
rules:
49+
main:
50+
allow:
51+
- $all
52+
253
linters:
54+
disable-all: true
355
enable:
4-
- asasalint
5-
- asciicheck
6-
- bidichk
756
- bodyclose
8-
- contextcheck
9-
- durationcheck
10-
- err113
11-
- errchkjson
12-
- errorlint
57+
- copyloopvar
58+
- dupl
59+
- errcheck
1360
- exhaustive
14-
- gocheckcompilerdirectives
15-
- gochecksumtype
61+
- funlen
62+
- gochecknoinits
63+
- goconst
64+
- gocritic
65+
- gocyclo
66+
- gofmt
67+
- goimports
1668
- gosec
17-
- gosmopolitan
18-
- loggercheck
69+
- gosimple
70+
- govet
71+
- ineffassign
72+
- lll
1973
- makezero
20-
- musttag
21-
- nilerr
22-
- nilnesserr
74+
- misspell
75+
- nakedret
2376
- noctx
24-
- protogetter
25-
- reassign
26-
- recvcheck
77+
- nolintlint
78+
- revive
2779
- rowserrcheck
28-
- spancheck
29-
- sqlclosecheck
30-
- testifylint
31-
- wrapcheck
32-
- zerologlint
33-
exclusions:
34-
generated: lax
35-
presets:
36-
- comments
37-
- common-false-positives
38-
- legacy
39-
- std-error-handling
40-
paths:
41-
- third_party$
42-
- builtin$
43-
- examples$
44-
formatters:
45-
enable:
46-
- gofmt
47-
exclusions:
48-
generated: lax
49-
paths:
50-
- third_party$
51-
- builtin$
52-
- examples$
53-
output:
54-
formats:
55-
text:
56-
print-issued-lines: false
57-
colors: false
58-
path: stdout
59-
show-stats: false
60-
run:
61-
issues-exit-code: 0
80+
- staticcheck
81+
- stylecheck
82+
- typecheck
83+
- unconvert
84+
- unparam
85+
- unused
86+
- whitespace
87+
88+
issues:
89+
exclude-rules:
90+
- path: _test\.go
91+
linters:
92+
- funlen
93+
- dupl
94+
- gocyclo
95+
- path: example/
96+
linters:
97+
- revive
98+
- path: example_tenants/
99+
linters:
100+
- revive
101+
- path: cmd/
102+
linters:
103+
- revive
104+
- text: "weak cryptographic primitive"
105+
linters:
106+
- gosec
107+
- text: "ST1003:"
108+
linters:
109+
- stylecheck
110+
- text: "G304: Potential file inclusion via variable"
111+
linters:
112+
- gosec
113+
exclude-use-default: false
114+
max-issues-per-linter: 0
115+
max-same-issues: 0
116+
uniq-by-line: true

README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,31 @@ Modular is a package that provides a structured way to create modular applicatio
2222
- **Dependency injection**: Inject required services into modules
2323
- **Multi-tenancy support**: Build applications that serve multiple tenants with isolated configurations
2424

25-
## Available Modules
25+
## 🧩 Available Modules
2626

27-
Modular comes with a collection of reusable modules that you can incorporate into your applications:
27+
Modular comes with a rich ecosystem of pre-built modules that you can easily integrate into your applications:
2828

29-
| Module | Description | Documentation |
30-
|------------------------------------|------------------------------------------|-------------------------------------------------|
31-
| [chimux](./modules/chimux) | Chi router integration for Modular | [Documentation](./modules/chimux/README.md) |
32-
| [database](./modules/database) | Database connectivity and SQL operations | [Documentation](./modules/database/README.md) |
33-
| [jsonschema](./modules/jsonschema) | JSON Schema validation services | [Documentation](./modules/jsonschema/README.md) |
34-
| [reverseproxy](./modules/reverseproxy) | Reverse proxy with routing capabilities | [Documentation](./modules/reverseproxy/README.md) |
29+
### Core Modules
30+
- **[Auth](modules/auth/README.md)** - Comprehensive authentication with JWT, sessions, password hashing, and OAuth2/OIDC support
31+
- **[Cache](modules/cache/README.md)** - Multi-backend caching with Redis and in-memory support
32+
- **[Database](modules/database/README.md)** - Database connectivity and management with multiple driver support
33+
- **[Event Bus](modules/eventbus/README.md)** - Asynchronous event handling and pub/sub messaging
3534

36-
For more information about the available modules, see the [modules directory](./modules).
35+
### Network & Communication
36+
- **[Chi Router (Chimux)](modules/chimux/README.md)** - HTTP routing with Chi router integration and middleware support
37+
- **[Reverse Proxy](modules/reverseproxy/README.md)** - Advanced reverse proxy with load balancing, circuit breaker, and health checks
38+
39+
### Utilities & Processing
40+
- **[JSON Schema](modules/jsonschema/README.md)** - JSON schema validation and processing
41+
- **[Scheduler](modules/scheduler/README.md)** - Job scheduling with cron expressions and worker pools
42+
43+
Each module is designed to be:
44+
- **Plug-and-play**: Easy integration with minimal configuration
45+
- **Configurable**: Extensive configuration options via YAML, environment variables, or code
46+
- **Production-ready**: Built with best practices, proper error handling, and comprehensive testing
47+
- **Well-documented**: Complete documentation with examples and API references
48+
49+
> 📖 For detailed information about each module, see the [modules directory](modules/README.md) or click on the individual module links above.
3750
3851
## Installation
3952

0 commit comments

Comments
 (0)