Skip to content

Conversation

@juan-malbeclabs
Copy link
Contributor

This pull request introduces new health and desired status fields for both devices and links in the serviceability/state.go file, enhancing the ability to track and serialize their operational states. These changes add new enums, fields, and JSON serialization logic to support more granular state management.

Device state enhancements:

  • Added new enums: DeviceHealth and DeviceDesiredStatus, with corresponding string values and JSON serialization methods.
  • Updated the Device struct to include DeviceHealth and DeviceDesiredStatus fields.
  • Modified the Device JSON serialization to output the new health and desired status fields. [1] [2]
  • Added a new DeviceStatusDrained status to the existing DeviceStatus enum.

Link state enhancements:

  • Added new enums: LinkHealth and LinkDesiredStatus, with corresponding string values and JSON serialization methods.
  • Updated the Link struct to include LinkHealth and LinkDesiredStatus fields.
  • Modified the Link JSON serialization to output the new health and desired status fields. [1] [2]

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances state management for devices and links by introducing health and desired status tracking capabilities to the Go SDK.

Changes:

  • Added DeviceHealth and DeviceDesiredStatus enums with JSON serialization support
  • Added LinkHealth and LinkDesiredStatus enums with JSON serialization support
  • Extended Device and Link structs with new health and desired status fields

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fix String()

Refactor DeviceDesiredStatus String method for clarity and error handling

Fix LinkHealth String method to use underscores in status string

fix: update expected output to include link_desired_status in test cases
@juan-malbeclabs juan-malbeclabs merged commit 619361b into main Jan 15, 2026
21 checks passed
@juan-malbeclabs juan-malbeclabs deleted the jo/update_go_sdk branch January 15, 2026 15:38
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.

4 participants