mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 16:13:47 +01:00
cross-wire backend rx/tx (#356)
This commit is contained in:
parent
5b7ff0968d
commit
75795b326b
@ -57,14 +57,14 @@ func Ingest(event ZitiEventJson) (*Usage, error) {
|
|||||||
}
|
}
|
||||||
if v, found := usage["egress.tx"]; found {
|
if v, found := usage["egress.tx"]; found {
|
||||||
if vFloat64, ok := v.(float64); ok {
|
if vFloat64, ok := v.(float64); ok {
|
||||||
u.BackendTx = int64(vFloat64)
|
u.BackendRx = int64(vFloat64)
|
||||||
} else {
|
} else {
|
||||||
logrus.Errorf("unable to assert 'usage/egress.tx': %v", event)
|
logrus.Errorf("unable to assert 'usage/egress.tx': %v", event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if v, found := usage["egress.rx"]; found {
|
if v, found := usage["egress.rx"]; found {
|
||||||
if vFloat64, ok := v.(float64); ok {
|
if vFloat64, ok := v.(float64); ok {
|
||||||
u.BackendRx = int64(vFloat64)
|
u.BackendTx = int64(vFloat64)
|
||||||
} else {
|
} else {
|
||||||
logrus.Errorf("unable to assert 'usage/egress.rx': %v", event)
|
logrus.Errorf("unable to assert 'usage/egress.rx': %v", event)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user