Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mquery
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Subconscious Compute (Open)
mquery
Commits
9ce43f13
Commit
9ce43f13
authored
1 year ago
by
Maaz Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
chore: update README
parent
221b1eef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+22
-1
22 additions, 1 deletion
README.md
with
22 additions
and
1 deletion
README.md
+
22
−
1
View file @
9ce43f13
# mquery (placeholder name)
A Rust library for handling PROMQL (and possibly MetricsQL) queries.
# Usage Example
```
rust
use
mquery
::{
Auth
,
QueryManager
};
use
tokio
::
runtime
::
Runtime
;
dotenv
::
dotenv
()
.expect
(
"No .env file found in working dir"
);
let
url
=
std
::
env
::
var
(
"VM_URL"
)
.expect
(
"VM URL not found in env"
);
let
token
=
std
::
env
::
var
(
"VM_TOKEN"
)
.expect
(
"VM URL not found in env"
);
let
rt
=
Runtime
::
new
()
.unwrap
();
let
query
=
"total_http_requests"
;
let
_response
=
rt
.block_on
(
QueryManager
::
new
(
url
.parse
()
.unwrap
())
.auth
(
Auth
::
Bearer
(
token
))
.query
(
query
),
)
.expect
(
"operation failed"
);
}
```
# Roadmap
-
[x] Basic raw queries (Instant and Ranged)
-
[ ] Query Builder
-
[ ] Basic queries
-
[ ] Operators
-
[ ] Functions
-
[ ] Runtime syntax checking
-
[ ] Compile time syntax checking
-
[ ] Deserialize to custom data types
-
[ ] Deserialize to custom data types
(with the help of proc-macros?)
-
[ ] Encapsulated raw queries with methods for constructing interpolated versions
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment