Skip to content

Conversation

@upsampled
Copy link
Contributor

@slayercat do not accept this yet, @jduranf will act as an acceptance tester and submit some additional example code, per #31

Regarding the actual PR, the OID generator function is intended to refresh the values stored in the existing OID structure. #40 should make OID thread-safe now, so the generator function can be called at any time to update values. Currently, the only way for GoSNMPServer to trigger this update is to set OIDsSyncOnWalkStart to true. This tells the code that if a GET-NEXT is received with an OID that is less than any of the previously registered OIDs, it should update the values. It’s a hack, but it works for the typical SNMP walk use case.

@jduranf
Copy link

jduranf commented Nov 11, 2025

@upsampled I tested the PR, and works as described, which I think will be fine for me

@upsampled
Copy link
Contributor Author

@jduranf do you have a simple generator that we can put some example code in the README.md?

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.

2 participants