-
Notifications
You must be signed in to change notification settings - Fork 78
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
remove hyper::Request
from RequestContext
#557
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
b38f14c
switch block-style to line-style comments
davepacheco 3ac8c39
do not update rustfmt.toml too
davepacheco 3b48121
fix websocket.rs (thanks @ahl!)
davepacheco 9df46f7
move extractors and generic schema utilities out of handler.rs
davepacheco d9307c4
Merge remote-tracking branch 'origin/main' into extractor-move
davepacheco db9770f
fix style
davepacheco 41a1cd6
WIP: making it work, need to rebase
davepacheco 833920f
update changelog with some todo items
davepacheco 067dd4a
prototype: remove request from RequestContext
davepacheco e394128
add XXX
davepacheco 8ee3aa9
fix copyrights
davepacheco fb31831
review feedback
davepacheco 1dff466
WIP: making it work, need to rebase
davepacheco 1c7642b
update changelog with some todo items
davepacheco 1673519
fix copyrights
davepacheco f77a40d
review feedback
davepacheco e962e2b
Merge branch 'merge-tmp' into exclusive-extractors
davepacheco f4dbd20
WIP: making it work, need to rebase
davepacheco ec810ea
update changelog with some todo items
davepacheco 29c6b47
fix copyrights
davepacheco 16d7ac3
review feedback
davepacheco c228e40
merge with "main"
davepacheco f68c794
Merge branch 'merge-with-main' into exclusive-extractors
davepacheco 08c9a9a
fix style
davepacheco 38324b4
update tests
davepacheco b200e10
remove TODO
davepacheco 5bb93e7
rename tests
davepacheco aa6f16e
fix output
davepacheco 0f956a5
copyright update was over-eager
davepacheco 95afcad
Merge remote-tracking branch 'origin/main' into exclusive-extractors
davepacheco 5979394
update CHANGELOG
davepacheco 0c727b9
bump for major version
davepacheco 5ec8a45
clean up docs, XXXs
davepacheco fabe335
prototype: remove request from RequestContext
davepacheco f52ff85
add XXX
davepacheco 21b0fbb
sync with "main" and "exclusive-extractors"
davepacheco 99c6e33
Merge branch 'remove-rq-merge' into remove-rq
davepacheco 951fb6c
rename the new pub type (requires moving the internal DTrace type wit…
davepacheco 3a41c99
update changelog
davepacheco 28fd310
remove TODO
davepacheco 415c444
add compatibility method
davepacheco 309f96d
typo
davepacheco 3e2dbdb
fix dtrace probes
davepacheco 185f7f8
websocket args should be last, too
davepacheco 0f78f7d
Merge remote-tracking branch 'origin/main' into exclusive-extractors
davepacheco 00193d1
found one straggler
davepacheco 7847891
Merge remote-tracking branch 'origin/exclusive-extractors' into remov…
davepacheco 6274e07
apply local changes to main
davepacheco 3958b93
Merge branch 'remove-rq-merge-2' into remove-rq
davepacheco 0b797e9
clippy
davepacheco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2023 Oxide Computer Company | ||
//! DTrace probes and support | ||
|
||
#[derive(Debug, Clone, serde::Serialize)] | ||
pub(crate) struct RequestInfo { | ||
pub id: String, | ||
pub local_addr: std::net::SocketAddr, | ||
pub remote_addr: std::net::SocketAddr, | ||
pub method: String, | ||
pub path: String, | ||
pub query: Option<String>, | ||
} | ||
|
||
#[derive(Debug, Clone, serde::Serialize)] | ||
pub(crate) struct ResponseInfo { | ||
pub id: String, | ||
pub local_addr: std::net::SocketAddr, | ||
pub remote_addr: std::net::SocketAddr, | ||
pub status_code: u16, | ||
pub message: String, | ||
} | ||
|
||
#[cfg(feature = "usdt-probes")] | ||
#[usdt::provider(provider = "dropshot")] | ||
mod probes { | ||
use crate::dtrace::{RequestInfo, ResponseInfo}; | ||
fn request__start(_: &RequestInfo) {} | ||
fn request__done(_: &ResponseInfo) {} | ||
} | ||
|
||
/// The result of registering a server's DTrace USDT probes. | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub enum ProbeRegistration { | ||
/// The probes are explicitly disabled at compile time. | ||
Disabled, | ||
|
||
/// Probes were successfully registered. | ||
Succeeded, | ||
|
||
/// Registration failed, with an error message explaining the cause. | ||
Failed(String), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved (but otherwise unchanged) from dropshot/src/lib.rs