channel: use real jsonrpc & cleanup package - #473
Open
yhabteab wants to merge 2 commits into
Open
Conversation
yhabteab
force-pushed
the
jsonrpc-channels
branch
from
July 28, 2026 06:50
f297f2d to
bdd9a62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a follow-up to the previous PR of mine, which introduced the
jsonrpcpackage in Icinga Go Library (see the requires section below). This PR now makes use of thejsonrpcpackage and cleans up thechannelpackage a bit. It was a bit messy before because we didn't change anything in that package since its initial implementation. There is no behavior change in this PR apart from the following two changes:jsonrpcpackage allows for a bidirectional communication, Icinga Notifications acts now as a JSON-RPC client and server at the same time. Meaning, for the former case, it will continue to send JSON-RPC requests to the channel plugins, and for the latter case, it will now also be able to receive JSON-RPC requests from the channel plugins. Currently, it only implements aLogmethod, which allows channel plugins to send log messages with fine-grained log level and ontexts to Icinga Notifications. This is useful for debugging purposes, as it allows channel plugins to log messages directly to the Icinga Notifications log as opposed to the currently usedstderrmechanism to report errors.SetConfigmethod on the channel plugins, which allows them to replace their configs without restarting. The only time a channel plugin will be restarted is when it crashes or when thechannel.typechanges in the config.Requires
rpcwith realjsonrpcpackage icinga-go-library#226