Skip to content

Commit 12b82c0

Browse files
+SELF
Signed-off-by: Spencer Gilbert <[email protected]>
1 parent 548190f commit 12b82c0

File tree

3 files changed

+54
-8
lines changed

3 files changed

+54
-8
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[Unit]
2+
Description="Vector - An observability pipelines tool"
3+
Documentation=https://vector.dev/
4+
Wants=network-online.target
5+
After=network-online.target
6+
7+
[Service]
8+
Type=exec
9+
User=vector
10+
Group=vector
11+
# Use `systemctl edit vector-agent` override environment variables,
12+
# or place `.conf` files under "/etc/systemd/system/vector-agent.d/".
13+
ENVIRONMENT="LOG_FORMAT=json"
14+
ENVIRONMENT="VECTOR_CONFIG_YAML=/etc/vector/agent/vector.yaml"
15+
ExecStartPre=/usr/bin/vector validate
16+
ExecStart=/usr/bin/vector
17+
ExecReload=/usr/bin/vector validate
18+
ExecReload=/bin/kill -HUP $MAINPID
19+
Restart=always
20+
AmbientCapabilities=CAP_NET_BIND_SERVICE
21+
22+
[Install]
23+
WantedBy=multi-user.target
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[Unit]
2+
Description="Vector - An observability pipelines tool"
3+
Documentation=https://vector.dev/
4+
Wants=network-online.target
5+
After=network-online.target
6+
7+
[Service]
8+
Type=exec
9+
User=vector
10+
Group=vector
11+
# Use `systemctl edit vector-aggregator` override environment variables,
12+
# or place `.conf` files under "/etc/systemd/system/vector-aggregator.d/".
13+
Environment="LOG_FORMAT=json"
14+
Environment="VECTOR_CONFIG_YAML=/etc/vector/aggregator/vector.yaml"
15+
ExecStartPre=/usr/bin/vector validate
16+
ExecStart=/usr/bin/vector
17+
ExecReload=/usr/bin/vector validate
18+
ExecReload=/bin/kill -HUP $MAINPID
19+
Restart=always
20+
AmbientCapabilities=CAP_NET_BIND_SERVICE
21+
22+
[Install]
23+
WantedBy=multi-user.target

lib/value/src/value.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ impl Eq for Value {}
7878
impl PartialEq<Self> for Value {
7979
fn eq(&self, other: &Self) -> bool {
8080
match (self, other) {
81-
(Value::Array(a), Value::Array(b)) => a.eq(b),
82-
(Value::Boolean(a), Value::Boolean(b)) => a.eq(b),
83-
(Value::Bytes(a), Value::Bytes(b)) => a.eq(b),
84-
(Value::Regex(a), Value::Regex(b)) => a.eq(b),
85-
(Value::Float(a), Value::Float(b)) => {
81+
(Self::Array(a), Self::Array(b)) => a.eq(b),
82+
(Self::Boolean(a), Self::Boolean(b)) => a.eq(b),
83+
(Self::Bytes(a), Self::Bytes(b)) => a.eq(b),
84+
(Self::Regex(a), Self::Regex(b)) => a.eq(b),
85+
(Self::Float(a), Self::Float(b)) => {
8686
// This compares floats with the following rules:
8787
// * NaNs compare as equal
8888
// * Positive and negative infinity are not equal
@@ -98,10 +98,10 @@ impl PartialEq<Self> for Value {
9898
false
9999
}
100100
}
101-
(Value::Integer(a), Value::Integer(b)) => a.eq(b),
102-
(Value::Object(a), Value::Object(b)) => a.eq(b),
101+
(Self::Integer(a), Self::Integer(b)) => a.eq(b),
102+
(Self::Object(a), Self::Object(b)) => a.eq(b),
103103
(Self::Null, Self::Null) => true,
104-
(Value::Timestamp(a), Value::Timestamp(b)) => a.eq(b),
104+
(Self::Timestamp(a), Self::Timestamp(b)) => a.eq(b),
105105
_ => false,
106106
}
107107
}

0 commit comments

Comments
 (0)