feat: send agent config in capabilities #211
Merged
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 pull request refactors the way agent configuration and connection details are handled and transmitted in the fleet config manager, improving clarity and extensibility. The changes introduce a new
ConnectionDetailsstruct for passing MQTT connection parameters, update the messaging system to include the agent's configuration YAML in capability messages, and update related tests accordingly.Connection details handling
ConnectionDetailsstruct inagent/configmgr/fleet/connection.goto encapsulate all MQTT connection parameters, replacing multiple function arguments with a single struct for clarity and maintainability.Connectmethod in both production and test code to use the newConnectionDetailsstruct, ensuring consistent connection parameter passing. [1] [2] [3] [4]Agent configuration transmission
Messaging and capabilities
sendCapabilitiesmethod and related message struct to accept and transmit the agent configuration, and refactored backend info collection for improved error handling and structure. [1] [2]Test updates
agent/configmgr/fleet/to_rpc_test.goto supply the agent configuration string and verify its inclusion in capability messages, ensuring full coverage of the new functionality. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]Dependency update
gopkg.in/yaml.v3dependency for YAML marshaling in the agent configuration manager.