Skip to content

Commit

Permalink
Merge branch 'master' into pablosichert/vrl-core
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosichert authored Feb 22, 2022
2 parents fbc30d7 + 18a8bed commit b858989
Show file tree
Hide file tree
Showing 106 changed files with 2,161 additions and 673 deletions.
129 changes: 111 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ tokio = { version = "1.17.0", default-features = false, features = ["full"] }
tokio-openssl = { version = "0.6.3", default-features = false }
tokio-stream = { version = "0.1.8", default-features = false, features = ["net", "sync", "time"] }
tokio-util = { version = "0.6", default-features = false, features = ["time"] }
console-subscriber = { version = "0.1.2", optional = true }
console-subscriber = { version = "0.1.3", optional = true }

# Tracing
tracing = { version = "0.1.31", default-features = false }
Expand Down Expand Up @@ -290,7 +290,7 @@ socket2 = { version = "0.4.4", default-features = false }
stream-cancel = { version = "0.8.1", default-features = false }
strip-ansi-escapes = { version = "0.1.1", default-features = false }
structopt = { version = "0.3.26", default-features = false }
strum = { version = "0.23", default-features = false }
strum = { version = "0.24", default-features = false }
strum_macros = { version = "0.23", default-features = false }
syslog = { version = "6.0.1", default-features = false, optional = true }
syslog_loose = { version = "0.16.0", default-features = false, optional = true }
Expand Down Expand Up @@ -327,7 +327,7 @@ approx = "0.5.1"
assert_cmd = "2.0.4"
base64 = "0.13.0"
criterion = { version = "0.3.5", features = ["html_reports", "async_tokio"] }
libc = "0.2.118"
libc = "0.2.119"
libz-sys = "1.1.3"
matches = "0.1.9"
pretty_assertions = "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/vector-api-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ serde = { version = "1.0.136", features = ["derive"] }
serde_json = { version = "1.0.79", features = ["raw_value"] }

# Error handling
anyhow = "1.0.53"
anyhow = "1.0.55"

# Tokio / Futures
async-stream = "0.3.2"
Expand Down
20 changes: 19 additions & 1 deletion lib/vector-api-client/graphql/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5566,7 +5566,7 @@
"description": "A stream of events emitted from matched component ID patterns",
"args": [
{
"name": "patterns",
"name": "outputsPatterns",
"description": null,
"type": {
"kind": "NON_NULL",
Expand All @@ -5587,6 +5587,24 @@
},
"defaultValue": null
},
{
"name": "inputsPatterns",
"description": null,
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "interval",
"description": null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
subscription OutputEventsByComponentIdPatternsSubscription(
$patterns: [String!]!, $limit: Int!, $interval: Int!, $encoding: EventEncodingType!){
outputEventsByComponentIdPatterns(patterns: $patterns, limit: $limit, interval: $interval) {
$outputsPatterns: [String!]!, $inputsPatterns: [String!], $limit: Int!, $interval: Int!, $encoding: EventEncodingType!){
outputEventsByComponentIdPatterns(outputsPatterns: $outputsPatterns, inputsPatterns: $inputsPatterns, limit: $limit, interval: $interval) {
__typename
... on Log {
componentId
Expand All @@ -13,6 +13,10 @@ subscription OutputEventsByComponentIdPatternsSubscription(
timestamp
string(encoding: $encoding)
}
... on Trace {
componentId
string(encoding: $encoding)
}
... on EventNotification {
pattern
notification
Expand Down
21 changes: 6 additions & 15 deletions lib/vector-api-client/src/gql/tap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,12 @@ impl From<TapEncodingFormat>
}
}

impl output_events_by_component_id_patterns_subscription::OutputEventsByComponentIdPatternsSubscriptionOutputEventsByComponentIdPatterns {
pub fn as_string(
&self,
) -> Option<&str>{
match self {
output_events_by_component_id_patterns_subscription::OutputEventsByComponentIdPatternsSubscriptionOutputEventsByComponentIdPatterns::Log(ev) => Some(ev.string.as_ref()),
output_events_by_component_id_patterns_subscription::OutputEventsByComponentIdPatternsSubscriptionOutputEventsByComponentIdPatterns::Metric(ev) => Some(ev.string.as_ref()),
_ => None,
}
}
}

pub trait TapSubscriptionExt {
/// Executes an output events subscription.
fn output_events_by_component_id_patterns_subscription(
&self,
component_patterns: Vec<String>,
outputs_patterns: Vec<String>,
inputs_patterns: Vec<String>,
encoding: TapEncodingFormat,
limit: i64,
interval: i64,
Expand All @@ -80,14 +69,16 @@ impl TapSubscriptionExt for crate::SubscriptionClient {
/// Executes an output events subscription.
fn output_events_by_component_id_patterns_subscription(
&self,
patterns: Vec<String>,
outputs_patterns: Vec<String>,
inputs_patterns: Vec<String>,
encoding: TapEncodingFormat,
limit: i64,
interval: i64,
) -> BoxedSubscription<OutputEventsByComponentIdPatternsSubscription> {
let request_body = OutputEventsByComponentIdPatternsSubscription::build_query(
output_events_by_component_id_patterns_subscription::Variables {
patterns,
outputs_patterns,
inputs_patterns: Some(inputs_patterns),
limit,
interval,
encoding: encoding.into(),
Expand Down
Loading

0 comments on commit b858989

Please sign in to comment.