Skip to content

Conversation

@martialblog
Copy link
Member

@martialblog martialblog commented Feb 6, 2026

For the v1 Release we want to introduce a proper State Type for the v1.0.0 - that type can then just implement the Stringer interface and have a NewFromInt/String function.

Fixes #125

This also changes check.ExitRaw to Exit and removes the Exitf.

@martialblog martialblog added this to the v1.0.0 milestone Feb 6, 2026
@martialblog martialblog self-assigned this Feb 6, 2026
type Status int

const (
Invalid Status = iota - 1
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure about this one. I kinda wanted something to "mean" error/invalid and we use a -1 value in result.WorstState.

Copy link
Member

Choose a reason for hiding this comment

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

That is one problem of the whole monitoring plugins interface, there is no "error" state

Copy link
Member Author

Choose a reason for hiding this comment

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

Any ideas? just use Unknown and add some custom error types?

Copy link
Member

Choose a reason for hiding this comment

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

hm, we could keep an "error" code and map it to "UNKNOWN" at exit, that would be nice from a programer perspective, but also confusing since the end is the same.

Copy link
Member

@RincewindsHat RincewindsHat left a comment

Choose a reason for hiding this comment

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

Not ideal, but there is only so much one can do under the given circumstances.
In general I think this is an improvement and we should go with it.

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.

Util function to transform string states

2 participants