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

the interface get_fields method should maybe return Field instances #94

Open
Jaymon opened this issue Feb 7, 2020 · 0 comments
Open

Comments

@Jaymon
Copy link
Owner

Jaymon commented Feb 7, 2020

Arguments for:

  1. You're basically mapping the fields into a dict structure that mimics what the Field class is for
  2. Using the Field and saying the interface method needs to return a list/dict of Field instances means all interfaces would automatically use the same interface, right now interfaces return dicts, but those dicts can have keys setup anyway they like.

Arguments against:

  1. all interface methods return standard data structures that are converted into prom structures down the line (eg, the Query converts the stream or the list into an iterator)
  2. The interface would need to import things from prom proper where traditionally the interface has been kept kind of separate though the interface gets passed prom proper interfaces like Schema. Query, and Config it doesn't actually import any of them.
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