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

Provide interface for query Execution #64

Closed
els0r opened this issue Mar 5, 2023 · 0 comments · Fixed by #65
Closed

Provide interface for query Execution #64

els0r opened this issue Mar 5, 2023 · 0 comments · Fixed by #65
Assignees
Labels
api Anything concerning endpoints for goProbe's APIs feature New feature or request
Milestone

Comments

@els0r
Copy link
Owner

els0r commented Mar 5, 2023

As a precursor to #43, this issue aims to provide a more generic approach to obtaining query results. With #43, there will be two ways of getting them:

  • via accessing goDB data and aggregating it
  • via consolidated data from a query run on goDB

The latter being important when aggregating results across several hosts.

Proposal is an interface, which goDB and any other tools that call goQuery implement:

type Runner interface {
    Run(ctx context.Context, stmt *query.Statement) (result results.Result, err error)
}

Implications of this are a major restructuring (not necessarily a refactor) of the package structure inside pkg (mainly query and goDB) and having a goDBQueryRunner execute queries.

Note on naming: going for Runner vs. Executor because the latter just sounds off.

@els0r els0r self-assigned this Mar 5, 2023
@els0r els0r added feature New feature or request api Anything concerning endpoints for goProbe's APIs labels Mar 5, 2023
@els0r els0r added this to the v4 Release milestone Mar 5, 2023
@els0r els0r linked a pull request Mar 6, 2023 that will close this issue
@els0r els0r mentioned this issue Mar 6, 2023
5 tasks
@els0r els0r closed this as completed in #65 Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Anything concerning endpoints for goProbe's APIs feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant