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

handle properties which can be multiple types #758

Open
jhsinger-klotho opened this issue Oct 17, 2023 · 0 comments
Open

handle properties which can be multiple types #758

jhsinger-klotho opened this issue Oct 17, 2023 · 0 comments

Comments

@jhsinger-klotho
Copy link
Contributor

jhsinger-klotho commented Oct 17, 2023

in k8s specs we often see IntOrString types or things like

type Quantity struct {
	// i is the quantity in int64 scaled form, if d.Dec == nil
	i int64Amount
	// d is the quantity in inf.Dec form if d.Dec != nil
	d infDecAmount
	// s is the generated value of this quantity to avoid recalculation
	s string

	// Change Format at will. See the comment for Canonicalize for
	// more details.
	Format
}

We need to be able to handle taking in multiple types for this

proposing the backend be structured similarly to

                      AverageValue:
                        type: (int, string)
                      Value:
                        type: (int, string)```
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