Skip to content

ability to disable http and/or event consumer for user log service - #3285

Open
maki5 wants to merge 4 commits into
mainfrom
feat/userlog_event_handler_on_demand
Open

ability to disable http and/or event consumer for user log service#3285
maki5 wants to merge 4 commits into
mainfrom
feat/userlog_event_handler_on_demand

Conversation

@maki5

@maki5 maki5 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

for user log service it's possible now to disable/enable from config

  • events listener(consumer)
  • http server

@codacy-production

codacy-production Bot commented Aug 11, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 19 complexity · -102 duplication

Metric Results
Complexity 19
Duplication -102

View in Codacy

🟢 Coverage 0.80% diff coverage · -0.04% coverage variation

Metric Results
Coverage variation -0.04% coverage variation (-1.00%)
Diff coverage 0.80% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c8a1f55) 84104 19347 23.00%
Head commit (fb8d211) 84148 (+44) 19327 (-20) 22.97% (-0.04%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3285) 125 1 0.80%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Comment thread services/userlog/pkg/config/config.go Outdated
Comment thread services/userlog/pkg/command/server.go Outdated
Comment thread pkg/shared/errors.go Outdated

@butonic butonic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the pkg/service package now implements both:

  1. service.go contains event processing that stores events in nats + publishes sse events
  2. http.go implements the http handler that reads from nats.

In the activitylog PR I extracted an activitylog service that wraps the nats kv store with the business logic to add and remove events. It is injected into the http service and the events service (but I like your name 'consumer' better).

I know this is more work, but I think we should seperate the implementation aspects. AFAICT the http service then does not need the event stream at all, so we only need to initiate it for the consumer (hm, it also publishes sse events, so maybe events is a better name in this case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants