Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precise allowed return type for EventMsg Values in custom plugin #616

Open
moutyque opened this issue Mar 11, 2025 · 0 comments
Open

Precise allowed return type for EventMsg Values in custom plugin #616

moutyque opened this issue Mar 11, 2025 · 0 comments

Comments

@moutyque
Copy link

Hello

From the doc and the source code the return object from a plugin is:

type EventMsg struct {
	Name      string                 `json:"name,omitempty"`
	Timestamp int64                  `json:"timestamp,omitempty"`
	Tags      map[string]string      `json:"tags,omitempty"`
	Values    map[string]interface{} `json:"values,omitempty"`
	Deletes   []string               `json:"deletes,omitempty"`
}

I was expected to be able to return any thing as a value however it breaks compatibility with based gnmic code.

I suggest to add information in the doc to restrict type as base type (int,float,string)

moutyque pushed a commit to moutyque/gnmic that referenced this issue Mar 11, 2025
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

No branches or pull requests

1 participant