Skip to content

worker config [WIP] #24

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

worker config [WIP] #24

wants to merge 5 commits into from

Conversation

sabban
Copy link
Contributor

@sabban sabban commented Mar 11, 2025

  • Added JSON configuration support for workers.
  • Introduced new WorkerConfig struct.
  • Updated Worker.Run method to handle JSON config.
  • Added unit tests for worker management and configuration.

sabban added 5 commits March 11, 2025 15:25
+ Added JSON configuration support for workers.
+ Introduced new ~WorkerConfig~ struct.
+ Updated ~Worker.Run~ method to handle JSON config.
+ Added unit tests for worker management and configuration.
Removed redundant `time.Sleep` calls in `TestManagerAddWorkerWithSuccess` and `TestManagerAddWorkerNewWorkerListenerError` to improve test performance.
+ Move errgroup initialization to the correct position in `cmd/root.go`
+ Ensure signal handling is properly set up in `internal/worker/worker_test.go`
+ Fix worker command environment setup in `internal/worker/root.go`
…dling

+ Moved the initialization of ~errgroup~ and ~context~ closer to their usage for better readability.
+ Adjusted the placement of ~HandleSignals~ to align with the new ~errgroup~ initialization.

*** build(go.mod): update dependencies and Go version

+ Bumped Go version to ~1.23.0~ and toolchain to ~go1.23.5~.
+ Updated dependencies:
  - ~github.com/crowdsecurity/go-cs-lib~ to ~v0.0.18~
  - ~github.com/negasus/haproxy-spoe-go~ to ~v1.0.6~
  - ~golang.org/x/sys~ to ~v0.32.0
+ Introduced a new ~KV~ struct to improve key-value pair handling.
+ Updated ~FrameYAML~ and ~Message~ structs to use the new ~KV~ struct.
+ Added ~UnmarshalKV~ method to ~KV~ for type-specific value parsing.
+ Refactored ~convertToFrame~ to utilize the new ~KV~ struct and parsing logic.
+ Added a new test case file ~testip.yaml~ to validate ~KV~ handling and frame assertions.
@sabban sabban changed the title worker config worker config [WIP] May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant