Merge pull request #584 from openziti/channel-updates

Update changelog and deps. Update channel2 -> channel library
This commit is contained in:
Paul Lorenz
2022-02-01 11:07:41 -05:00
committed by GitHub
28 changed files with 521 additions and 368 deletions
+93
View File
@@ -3,6 +3,9 @@
* Enhancement: Durable Eventual Events
* Enhancement: API Session/Service Policy Enforcer Metrics
* Enhancement: Support Controller Address Changes
* Enhancement: Control Channel Metrics Split
* Enhancement: Metrics Output Size Reduction
* Enhancement: Channel Library Updates
## Durable Eventual Events
@@ -129,6 +132,96 @@ web:
newAddress: localhost:1280
```
## Control Channel Latency Metrics Changes
The control channel metrics have been broken into two separate metrics. Previously the metric measured how long it took for the message to be enqueued, sent and a reply received. Now the time to write to wire has been broken out.
* `ctrl.latency` - This now measures the time from wire send to response received
* `ctrl.queue_time` - This measure the time from when the send is requested to when it actually is written to the wire
## Metrics Output Size Reduction
If using the JSON metrics events output, the output has changed.
A metrics entry which previously would have looked like:
```
{
"metric": "ctrl.tx.bytesrate",
"metrics": {
"ctrl.tx.bytesrate.count": 222,
"ctrl.tx.bytesrate.m15_rate": 0.37625904063382576,
"ctrl.tx.bytesrate.m1_rate": 0.12238911649077193,
"ctrl.tx.bytesrate.m5_rate": 0.13784280219782497,
"ctrl.tx.bytesrate.mean_rate": 0.1373326200238093
},
"namespace": "metrics",
"source_entity_id": "z7ZmJux8a7",
"source_event_id": "7b77ac53-c017-409e-afcc-fd0e1878a301",
"source_id": "ctrl_client",
"timestamp": "2022-01-26T21:46:45.866133131Z"
}
```
will now look like:
```
{
"metric": "ctrl.tx.bytesrate",
"metrics": {
"count": 222,
"m15_rate": 0.37625904063382576,
"m1_rate": 0.12238911649077193,
"m5_rate": 0.13784280219782497,
"mean_rate": 0.1373326200238093
},
"namespace": "metrics",
"source_entity_id": "z7ZmJux8a7",
"source_event_id": "7b77ac53-c017-409e-afcc-fd0e1878a301",
"source_id": "ctrl_client",
"timestamp": "2022-01-26T21:46:45.866133131Z",
"version" : 2
}
```
Note that the metric keys no longer have the metric name as a prefix. Also, the emitted metric has a new `version` field which is set to 2.
Metrics with a single key, which previously looked like:
```
{
"metric": "xgress.acks.queue_size",
"metrics": {
"xgress.acks.queue_size": 0
},
"namespace": "metrics",
"source_event_id": "6eb30de2-55de-49d5-828f-4268a3707512",
"source_id": "z7ZmJux8a7",
"timestamp": "2022-01-26T22:06:33.242933687Z",
"version": 2
}
```
now look like:
```
{
"metric": "xgress.acks.queue_size",
"metrics": {
"value": 0
},
"namespace": "metrics",
"source_event_id": "6eb30de2-55de-49d5-828f-4268a3707512",
"source_id": "z7ZmJux8a7",
"timestamp": "2022-01-26T22:06:33.242933687Z",
"version": 2
}
```
## Channel Library Updates
The channel library, which is used by edge communications, control channel, links and management channel, has been refactored. It now does a better job handling canceled messaged through the send process. If a message send times out before it is sent, the message will now no longer be sent when it gets to the head of the queue. Channels can now be instrumented to allow better metrics gathering, as seen above the the split out control channel latency metrics. Channel internals have also been refactored so that initialization is better defined, leading to better concurrency characteristics.
# Release 0.24.4
## What's New
+9 -7
View File
@@ -33,10 +33,10 @@ require (
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
github.com/michaelquigley/pfxlog v0.6.3
github.com/openziti/edge v0.21.68
github.com/openziti/fabric v0.17.31
github.com/openziti/foundation v0.16.18
github.com/openziti/sdk-golang v0.15.136
github.com/openziti/edge v0.21.70
github.com/openziti/fabric v0.17.34
github.com/openziti/foundation v0.17.0
github.com/openziti/sdk-golang v0.16.0
github.com/pborman/uuid v1.2.0
github.com/pkg/errors v0.9.1
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
@@ -57,6 +57,8 @@ require (
rsc.io/goversion v1.2.0
)
require github.com/openziti/channel v0.18.4
require (
github.com/AppsFlyer/go-sundheit v0.5.0 // indirect
github.com/BurntSushi/toml v0.4.1 // indirect
@@ -106,6 +108,7 @@ require (
github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 // indirect
github.com/kataras/go-events v0.0.3-0.20201007151548-c411dc70c0a6 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/kyokomi/emoji/v2 v2.2.8 // indirect
github.com/lucas-clemente/quic-go v0.23.0 // indirect
github.com/lucasb-eyer/go-colorful v1.0.3 // indirect
@@ -130,7 +133,6 @@ require (
github.com/oklog/ulid v1.3.1 // indirect
github.com/onsi/ginkgo v1.16.4 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openziti/channel v0.18.2 // indirect
github.com/openziti/dilithium v0.3.3 // indirect
github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231 // indirect
github.com/parallaxsecond/parsec-client-go v0.0.0-20220111122524-cb78842db373 // indirect
@@ -152,11 +154,11 @@ require (
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.mongodb.org/mongo-driver v1.7.5 // indirect
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed // indirect
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 // indirect
golang.org/x/image v0.0.0-20191206065243-da761ea9ff43 // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.7 // indirect
+84 -14
View File
@@ -55,6 +55,7 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
github.com/AppsFlyer/go-sundheit v0.4.0/go.mod h1:iZ8zWMS7idcvmqewf5mEymWWgoOiG/0WD4+aeh+heX4=
github.com/AppsFlyer/go-sundheit v0.5.0 h1:/VxpyigCfJrq1r97mn9HPiAB2qrhcTFHwNIIDr15CZM=
github.com/AppsFlyer/go-sundheit v0.5.0/go.mod h1:2ZM0BnfqT/mljBQO224VbL5XH06TgWuQ6Cn+cTtCpTY=
github.com/Azure/azure-sdk-for-go v32.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
@@ -77,6 +78,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/Jeffail/gabs v1.4.0 h1://5fYRRTq1edjfIrQGvdkcd22pkYUrHZ5YC/H2GJVAo=
github.com/Jeffail/gabs v1.4.0/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc=
github.com/Jeffail/gabs/v2 v2.6.1/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI=
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
github.com/MichaelMure/go-term-markdown v0.1.4 h1:Ir3kBXDUtOX7dEv0EaQV8CNPpH+T7AfTh0eniMOtNcs=
@@ -96,6 +98,7 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.18/go.mod h1:L+HB2uBoDgi3+r1pJEJcbGwyyHhd2QXaGsKLbDwtm8Q=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U=
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI=
github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc=
@@ -119,10 +122,12 @@ github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20211106181442-e4c1a74c66bd h1:f
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20211106181442-e4c1a74c66bd/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
@@ -135,6 +140,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/biogo/store v0.0.0-20190426020002-884f370e325d/go.mod h1:Iev9Q3MErcn+w3UOJD/DkEzllvugfdx7bGcMOFhvr/4=
github.com/biogo/store v0.0.0-20200525035639-8c94ae1e7c9c h1:qq7IeRYvCmew9ThhcfslD5XD25P/UsBxsTozk6ywF+A=
github.com/biogo/store v0.0.0-20200525035639-8c94ae1e7c9c/go.mod h1:wdbXg77soR6ESRprAMEwAQDFtLT6EAGF5o1GRy0cB5k=
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
@@ -175,18 +181,24 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-iptables v0.6.0 h1:is9qnZMPYjLd8LYqmm/qlE+wwEgJIkTYdhV3rfZo4jk=
github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpu/goacmedns v0.1.1/go.mod h1:MuaouqEhPAHxsbqjgnck5zeghuwBP1dLnPoobeGqugQ=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
@@ -195,6 +207,7 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deepmap/oapi-codegen v1.3.13/go.mod h1:WAmG5dWY8/PYHt4vKxlt90NsbHMAOCiteYKZMiIRfOo=
github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3 h1:AqeKSZIG/NIC75MNQlPy/LM3LxfpLwahICJBHwSMFNc=
github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3/go.mod h1:hEfFauPHz7+NnjR/yHJGhrKo1Za+zStgwUETx3yzqgY=
@@ -251,13 +264,16 @@ github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvD
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E=
github.com/getkin/kin-openapi v0.13.0/go.mod h1:WGRs2ZMM1Q8LR1QBEwUxC6RJEfaBcD0s+pcEVXFuAjw=
github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/go-acme/lego/v4 v4.2.0 h1:zEvpcDLqvzOlNUGBMA0MCKPpb9UBbnBzgWwCIbTEt2g=
github.com/go-acme/lego/v4 v4.2.0/go.mod h1:jmhqxBaangB8txXZKjRLTPXFXUwPCTU2fU8S9/eQzBI=
github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=
github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -322,6 +338,7 @@ github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29g
github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo=
github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98=
github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk=
github.com/go-openapi/runtime v0.21.0/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs=
github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs=
github.com/go-openapi/runtime v0.21.1/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs=
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
@@ -370,6 +387,7 @@ github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE
github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw=
github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4=
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8=
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
@@ -468,8 +486,11 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-licenses v0.0.0-20201026145851-73411c8fa237/go.mod h1:g1VOUGKZYIqe8lDq2mL7plhAWXqrEaGUs7eIjthN1sk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
github.com/google/licenseclassifier v0.0.0-20190926221455-842c0d70d702/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -572,12 +593,16 @@ github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhK
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/influxdata/influxdb-client-go/v2 v2.2.2/go.mod h1:fa/d1lAdUHxuc1jedx30ZfNG573oQTQmUni3N6pcW+0=
github.com/influxdata/influxdb-client-go/v2 v2.7.0/go.mod h1:Y/0W1+TZir7ypoQZYd2IrnVOKB3Tq6oegAQeSVN/+EU=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jedib0t/go-pretty/v6 v6.2.4 h1:wdaj2KHD2W+mz8JgJ/Q6L/T5dB7kyqEFI16eLq7GEmk=
github.com/jedib0t/go-pretty/v6 v6.2.4/go.mod h1:+nE9fyyHGil+PuISTCrp7avEdo6bqoMwqZnuiK2r2a0=
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg=
@@ -618,6 +643,7 @@ github.com/kataras/go-events v0.0.3-0.20201007151548-c411dc70c0a6 h1:XXnySN8wVet
github.com/kataras/go-events v0.0.3-0.20201007151548-c411dc70c0a6/go.mod h1:6IxMW59VJdEIqj3bjFGJvGLRdb0WHtrlxPZy9qXctcg=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 h1:WjT3fLi9n8YWh/Ih8Q1LHAPsTqGddPcHqscN+PJ3i68=
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
@@ -637,8 +663,9 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
@@ -647,6 +674,7 @@ github.com/kyokomi/emoji/v2 v2.2.8/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5Cqkmo
github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA=
github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w=
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg=
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/linode/linodego v0.21.0/go.mod h1:UTpq1JUZD0CZsJ8rt+0CRkqbzrp1MbGakVPt2DXY5Mk=
github.com/liquidweb/liquidweb-go v1.6.1/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVLEIG/i5J9cyixzQ=
@@ -659,6 +687,7 @@ github.com/lucsky/cuid v1.2.1 h1:MtJrL2OFhvYufUIn48d35QGXyeTC8tn0upumW9WwTHg=
github.com/lucsky/cuid v1.2.1/go.mod h1:QaaJqckboimOmhRSJXSx/+IT+VTfxfPGSo/6mfgUfmE=
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
@@ -688,6 +717,7 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
@@ -809,22 +839,32 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/openziti/channel v0.18.2 h1:H0gsINZGr4AGK7ryHSECbCONQrPRQuV37sRcqbrCQZU=
github.com/openziti/channel v0.18.2/go.mod h1:wmpGSNQranDE7jsiT+Cv31UzOO3z+m69JxE2tzYwkyY=
github.com/openziti/channel v0.18.3/go.mod h1:wmpGSNQranDE7jsiT+Cv31UzOO3z+m69JxE2tzYwkyY=
github.com/openziti/channel v0.18.4 h1:TXQcqJjT+cZYt6uk4Ri+4lGsKCNtkj5wpn6GbX0MIkY=
github.com/openziti/channel v0.18.4/go.mod h1:wmpGSNQranDE7jsiT+Cv31UzOO3z+m69JxE2tzYwkyY=
github.com/openziti/dilithium v0.3.3 h1:PLgQ6PMNLSTzCFbX/h98cmudgz/cU6TmjdSv5NAPD8k=
github.com/openziti/dilithium v0.3.3/go.mod h1:vsCjI2AU/hon9e+dLhUFbCNGesJDj2ASgkySOcpmvjo=
github.com/openziti/edge v0.21.68 h1:jbZ2rpxA6ky0OcnS3aV1r/ey1U6edADTGOlnqVHHdoM=
github.com/openziti/edge v0.21.68/go.mod h1:RdCZP8J9ktnSuxAvKnPtO9Q+XNC4bw0jEc9ntmTFnYQ=
github.com/openziti/fabric v0.17.31 h1:gvPnRrejmMzMy2wyotair0lcaBYGZ2hwYWWWNF2uPU8=
github.com/openziti/fabric v0.17.31/go.mod h1:sRf0iQ9+0bpZK1HKW/1QHvRaEbijyWqK33qxBmqV5Pc=
github.com/openziti/foundation v0.16.18 h1:Ietmq4VwVP+Vt+D1H/O75RAyS4XAmHWBjR8RftxlJC0=
github.com/openziti/edge v0.21.70 h1:pzv1f6P0QSIHUwVNYlP4a11EZtRy6bMAT3wzkHOg7Q0=
github.com/openziti/edge v0.21.70/go.mod h1:Jh7/RTvgxS3gTETnKQV5eITom9qa0TQTHOf0SqFqARs=
github.com/openziti/fabric v0.17.34 h1:A2P2aeJg8UmsXY81SVAKcc2UFoVxkWjvYAOWNoDGFNo=
github.com/openziti/fabric v0.17.34/go.mod h1:ZOuDngcSa0VJCNHRdYw6xCD0Tr/peZrc+Uqi8Gqc25U=
github.com/openziti/foundation v0.16.17/go.mod h1:D8IchItaO2SvK/fc/JpX9yF0vNymmOw2gzeNqwHz4+g=
github.com/openziti/foundation v0.16.18/go.mod h1:D8IchItaO2SvK/fc/JpX9yF0vNymmOw2gzeNqwHz4+g=
github.com/openziti/sdk-golang v0.15.136 h1:GUbecZQskbliHiHr0MKgXiS2VDZlTdQcuiw3zSvVKUQ=
github.com/openziti/sdk-golang v0.15.136/go.mod h1:0tdM848mAA3GZE2BnDSjCxj61/Q87Qa6bF6zLn2NEjY=
github.com/openziti/foundation v0.17.0 h1:frhZqq9f6l+BBgYNYpnvo36T1CQsN/7DtKJPWDOQpHI=
github.com/openziti/foundation v0.17.0/go.mod h1:D8IchItaO2SvK/fc/JpX9yF0vNymmOw2gzeNqwHz4+g=
github.com/openziti/sdk-golang v0.16.0 h1:Wq4P17btCYeh6nJsFVQpMzC4xgXBTYcKHOJr7Qb484w=
github.com/openziti/sdk-golang v0.16.0/go.mod h1:Bxmfwgn89gIaIkdQ/3PENo7pLu5Yw1Eyiu2taP3Vqow=
github.com/oracle/oci-go-sdk v24.2.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231 h1:fa50YL1pzKW+1SsBnJDOHppJN9stOEwS+CRWyUtyYGU=
github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA=
github.com/parallaxsecond/parsec-client-go v0.0.0-20210416104105-e2d188152601/go.mod h1:iFrEMRwLidGESW7mwIhRWDD7m5ktzKeCX2XNCyAFtNk=
github.com/parallaxsecond/parsec-client-go v0.0.0-20220111122524-cb78842db373 h1:CUvH4JL/8OVy023LMER3dB/MerNQ6OIz4QV3E/JQ3UY=
github.com/parallaxsecond/parsec-client-go v0.0.0-20220111122524-cb78842db373/go.mod h1:gLH27qo/dvMhLTVVyMELpe3Tut7sOfkiDg7ZpeqKwsw=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
@@ -832,6 +872,7 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo=
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
@@ -930,6 +971,7 @@ github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
@@ -953,6 +995,7 @@ github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0=
@@ -963,10 +1006,12 @@ github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
github.com/spf13/viper v1.10.0 h1:mXH0UwHS4D2HwWZa75im4xIQynLfblmWV7qcWpfv0yk=
github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM=
github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
@@ -994,6 +1039,7 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1
github.com/transip/gotransip/v6 v6.2.0/go.mod h1:pQZ36hWWRahCUXkFWlx9Hs711gLd8J4qdgLdRzmtY+g=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
@@ -1005,6 +1051,7 @@ github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
github.com/vultr/govultr/v2 v2.0.0/go.mod h1:2PsEeg+gs3p/Fo5Pw8F9mv+DUBEOlrNZ8GmCTGmhOhs=
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
@@ -1017,6 +1064,7 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -1074,7 +1122,9 @@ golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -1091,16 +1141,18 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed h1:YoWVYYAfvQ4ddHv3OKmIvX7NCAhFGTj62VP2l2kfBbA=
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE=
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1172,6 +1224,7 @@ golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -1211,6 +1264,8 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -1260,7 +1315,9 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1289,6 +1346,7 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191119060738-e882bf8e40c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1310,6 +1368,7 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1354,8 +1413,9 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 h1:XDXtA5hveEEV8JB2l7nhMTp3t3cHp9ZpwcdjqyEWLlo=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -1374,6 +1434,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -1398,6 +1460,7 @@ golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgw
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -1405,6 +1468,7 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191118222007-07fc4c7f2b98/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -1634,13 +1698,18 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/ns1/ns1-go.v2 v2.4.2/go.mod h1:GMnKY+ZuoJ+lVLL+78uSTjwTz2jMazq6AfGKQOYhsPk=
gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w=
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98=
gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g=
gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@@ -1657,6 +1726,7 @@ gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+8 -4
View File
@@ -17,7 +17,7 @@
package subcmd
import (
"github.com/openziti/foundation/channel2"
"github.com/openziti/channel"
"github.com/openziti/foundation/identity/dotziti"
"github.com/openziti/foundation/identity/identity"
"github.com/openziti/foundation/transport"
@@ -37,7 +37,11 @@ func NewMgmtClient(cmd *cobra.Command) *mgmtClient {
return client
}
func (c *mgmtClient) Connect() (channel2.Channel, error) {
func (c *mgmtClient) Connect() (channel.Channel, error) {
return c.ConnectAndBind(nil)
}
func (c *mgmtClient) ConnectAndBind(bindHandler channel.BindHandler) (channel.Channel, error) {
if endpoint, id, err := dotziti.LoadIdentity(c.idName); err == nil {
c.id = id
endpointStr := endpoint
@@ -45,8 +49,8 @@ func (c *mgmtClient) Connect() (channel2.Channel, error) {
endpointStr = c.mgmtEndpoint
}
if mgmtAddress, err := transport.ParseAddress(endpointStr); err == nil {
dialer := channel2.NewClassicDialer(c.id, mgmtAddress, nil)
if ch, err := channel2.NewChannel("mgmt", dialer, nil); err == nil {
dialer := channel.NewClassicDialer(c.id, mgmtAddress, nil)
if ch, err := channel.NewChannel("mgmt", dialer, bindHandler, nil); err == nil {
return ch, nil
} else {
return nil, err
+10 -16
View File
@@ -18,11 +18,10 @@ package subcmd
import (
"crypto/sha1"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/openziti/foundation/identity/certtools"
"github.com/spf13/cobra"
"time"
@@ -51,25 +50,20 @@ var createRouter = &cobra.Command{
},
}
if body, err := proto.Marshal(request); err == nil {
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_CreateRouterRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_CreateRouterRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
}
} else {
panic(err)
+5 -5
View File
@@ -19,8 +19,8 @@ package subcmd
import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -53,13 +53,13 @@ var createService = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_CreateServiceRequestType), body)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_CreateServiceRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
+5 -5
View File
@@ -19,8 +19,8 @@ package subcmd
import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/openziti/foundation/util/stringz"
"github.com/spf13/cobra"
"time"
@@ -81,13 +81,13 @@ var createTerminator = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_CreateTerminatorRequestType), body)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_CreateTerminatorRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
+5 -5
View File
@@ -19,8 +19,8 @@ package subcmd
import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -43,8 +43,8 @@ var getService = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_GetServiceRequestType), body)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_GetServiceRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
@@ -65,8 +65,8 @@ var getService = &cobra.Command{
} else {
fmt.Printf("Id not found\n")
}
} else if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
} else if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
+5 -5
View File
@@ -19,8 +19,8 @@ package subcmd
import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -43,8 +43,8 @@ var getTerminator = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_GetTerminatorRequestType), body)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_GetTerminatorRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
@@ -59,8 +59,8 @@ var getTerminator = &cobra.Command{
} else {
fmt.Printf("Id not found\n")
}
} else if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
} else if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
+21 -26
View File
@@ -17,11 +17,11 @@
package subcmd
import (
"github.com/openziti/foundation/channel2"
"github.com/openziti/fabric/pb/mgmt_pb"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/spf13/cobra"
"time"
)
@@ -49,36 +49,31 @@ func inspect(cmd *cobra.Command, args []string) {
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_InspectRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_InspectRequestType), body)
responseMsg, err := requestMsg.WithTimeout(10 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == int32(mgmt_pb.ContentType_InspectResponseType) {
response := &mgmt_pb.InspectResponse{}
err := proto.Unmarshal(responseMsg.Body, response)
if err != nil {
panic(err)
}
if response.Success {
fmt.Printf("\nResults: (%d)\n", len(response.Values))
for _, value := range response.Values {
fmt.Printf("%v.%v\n", value.AppId, value.Name)
fmt.Printf("%v\n\n", value.Value)
}
} else {
fmt.Printf("\nEncountered errors: (%d)\n", len(response.Errors))
for _, err := range response.Errors {
fmt.Printf("\t%v\n", err)
}
if responseMsg.ContentType == int32(mgmt_pb.ContentType_InspectResponseType) {
response := &mgmt_pb.InspectResponse{}
err := proto.Unmarshal(responseMsg.Body, response)
if err != nil {
panic(err)
}
if response.Success {
fmt.Printf("\nResults: (%d)\n", len(response.Values))
for _, value := range response.Values {
fmt.Printf("%v.%v\n", value.AppId, value.Name)
fmt.Printf("%v\n\n", value.Value)
}
} else {
panic(errors.New("unexpected response"))
fmt.Printf("\nEncountered errors: (%d)\n", len(response.Errors))
for _, err := range response.Errors {
fmt.Printf("\t%v\n", err)
}
}
case <-time.After(10 * time.Second):
panic(errors.New("timeout"))
} else {
panic(errors.New("unexpected response"))
}
} else {
panic(err)
+23 -29
View File
@@ -20,8 +20,8 @@ import (
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"sort"
"time"
@@ -46,40 +46,34 @@ func listCircuits(cmd *cobra.Command, args []string) {
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_ListCircuitsRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_ListCircuitsRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == int32(mgmt_pb.ContentType_ListCircuitsResponseType) {
response := &mgmt_pb.ListCircuitsResponse{}
err := proto.Unmarshal(responseMsg.Body, response)
if err == nil {
out := fmt.Sprintf("\nCircuits: (%d)\n\n", len(response.Circuits))
out += fmt.Sprintf("%-12s | %-12s | %-12s | %s\n", "Id", "Client", "Service", "Path")
sort.Slice(response.Circuits, func(i, j int) bool {
if response.Circuits[i].ServiceId == response.Circuits[j].ServiceId {
return response.Circuits[i].Id < response.Circuits[j].Id
}
return response.Circuits[i].ServiceId < response.Circuits[j].ServiceId
})
for _, s := range response.Circuits {
out += fmt.Sprintf("%-12s | %-12s | %-12s | %s", s.Id, s.ClientId, s.ServiceId, s.Path.CalculateDisplayPath())
if responseMsg.ContentType == int32(mgmt_pb.ContentType_ListCircuitsResponseType) {
response := &mgmt_pb.ListCircuitsResponse{}
err := proto.Unmarshal(responseMsg.Body, response)
if err == nil {
out := fmt.Sprintf("\nCircuits: (%d)\n\n", len(response.Circuits))
out += fmt.Sprintf("%-12s | %-12s | %-12s | %s\n", "Id", "Client", "Service", "Path")
sort.Slice(response.Circuits, func(i, j int) bool {
if response.Circuits[i].ServiceId == response.Circuits[j].ServiceId {
return response.Circuits[i].Id < response.Circuits[j].Id
}
out += "\n"
fmt.Print(out)
} else {
panic(err)
return response.Circuits[i].ServiceId < response.Circuits[j].ServiceId
})
for _, s := range response.Circuits {
out += fmt.Sprintf("%-12s | %-12s | %-12s | %s", s.Id, s.ClientId, s.ServiceId, s.Path.CalculateDisplayPath())
}
} else {
panic(errors.New("unexpected response"))
}
out += "\n"
fmt.Print(out)
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
} else {
panic(err)
}
} else {
panic(errors.New("unexpected response"))
}
} else {
panic(err)
+32 -38
View File
@@ -20,8 +20,8 @@ import (
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"sort"
"time"
@@ -46,49 +46,43 @@ func listLinks(cmd *cobra.Command, args []string) {
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_ListLinksRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_ListLinksRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == int32(mgmt_pb.ContentType_ListLinksResponseType) {
response := &mgmt_pb.ListLinksResponse{}
err := proto.Unmarshal(responseMsg.Body, response)
if err == nil {
out := fmt.Sprintf("\nLinks: (%d)\n\n", len(response.Links))
out += fmt.Sprintf("%-6s | %-24s -> %-24s | %-12s | %-4s | %-13s | %-12s | %-6s\n", "Id", "Src", "Dst", "State", "Cost", "Latency", "Full Cost", "Status")
sort.Slice(response.Links, func(i, j int) bool {
if response.Links[i].Src == response.Links[j].Src {
return response.Links[i].Dst < response.Links[j].Dst
}
return response.Links[i].Src < response.Links[j].Src
})
for _, l := range response.Links {
status := "up"
if l.Down {
status = "down"
}
// Convert nanoseconds to fractional seconds
srcLatency := float64(l.SrcLatency) / 1_000_000_000.0
dstLatency := float64(l.DstLatency) / 1_000_000_000.0
cost := (l.SrcLatency / 1_000_000) + (l.DstLatency / 1_000_000) + int64(l.Cost)
out += fmt.Sprintf("%-6s | %-24s -> %-24s | %-12s | %-4d | %-0.4f %-0.4f | %-12v | %-6v\n", l.Id, l.Src, l.Dst, l.State, l.Cost, srcLatency, dstLatency,
cost, status)
if responseMsg.ContentType == int32(mgmt_pb.ContentType_ListLinksResponseType) {
response := &mgmt_pb.ListLinksResponse{}
err := proto.Unmarshal(responseMsg.Body, response)
if err == nil {
out := fmt.Sprintf("\nLinks: (%d)\n\n", len(response.Links))
out += fmt.Sprintf("%-6s | %-24s -> %-24s | %-12s | %-4s | %-13s | %-12s | %-6s\n", "Id", "Src", "Dst", "State", "Cost", "Latency", "Full Cost", "Status")
sort.Slice(response.Links, func(i, j int) bool {
if response.Links[i].Src == response.Links[j].Src {
return response.Links[i].Dst < response.Links[j].Dst
}
out += "\n"
fmt.Print(out)
} else {
panic(err)
return response.Links[i].Src < response.Links[j].Src
})
for _, l := range response.Links {
status := "up"
if l.Down {
status = "down"
}
// Convert nanoseconds to fractional seconds
srcLatency := float64(l.SrcLatency) / 1_000_000_000.0
dstLatency := float64(l.DstLatency) / 1_000_000_000.0
cost := (l.SrcLatency / 1_000_000) + (l.DstLatency / 1_000_000) + int64(l.Cost)
out += fmt.Sprintf("%-6s | %-24s -> %-24s | %-12s | %-4d | %-0.4f %-0.4f | %-12v | %-6v\n", l.Id, l.Src, l.Dst, l.State, l.Cost, srcLatency, dstLatency,
cost, status)
}
} else {
panic(errors.New("unexpected response"))
}
out += "\n"
fmt.Print(out)
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
} else {
panic(err)
}
} else {
panic(errors.New("unexpected response"))
}
} else {
panic(err)
+25 -31
View File
@@ -20,8 +20,8 @@ import (
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -47,42 +47,36 @@ var listRouters = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_ListRoutersRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_ListRoutersRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == int32(mgmt_pb.ContentType_ListRoutersResponseType) {
response := &mgmt_pb.ListRoutersResponse{}
err := proto.Unmarshal(responseMsg.Body, response)
if err == nil {
out := fmt.Sprintf("\nRouters: (%d)\n\n", len(response.Routers))
out += fmt.Sprintf("%-12s | %-30s | %-40s | %-9s | %s\n", "Id", "Name", "Fingerprint", "Status", "Version")
for _, r := range response.Routers {
status := ""
if r.Connected {
status += "Connected"
}
if r.ListenerAddress != "" {
status += " (" + r.ListenerAddress + ")"
}
out += fmt.Sprintf("%-12s | %-30s | %-40s | %-9s | %s\n", r.Id, r.Name, r.Fingerprint, status, r.Version)
if responseMsg.ContentType == int32(mgmt_pb.ContentType_ListRoutersResponseType) {
response := &mgmt_pb.ListRoutersResponse{}
err := proto.Unmarshal(responseMsg.Body, response)
if err == nil {
out := fmt.Sprintf("\nRouters: (%d)\n\n", len(response.Routers))
out += fmt.Sprintf("%-12s | %-30s | %-40s | %-9s | %s\n", "Id", "Name", "Fingerprint", "Status", "Version")
for _, r := range response.Routers {
status := ""
if r.Connected {
status += "Connected"
}
out += "\n"
fmt.Print(out)
} else {
panic(err)
if r.ListenerAddress != "" {
status += " (" + r.ListenerAddress + ")"
}
out += fmt.Sprintf("%-12s | %-30s | %-40s | %-9s | %s\n", r.Id, r.Name, r.Fingerprint, status, r.Version)
}
} else {
panic(errors.New("unexpected response"))
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
}
out += "\n"
fmt.Print(out)
} else {
panic(err)
}
} else {
panic(errors.New("unexpected response"))
}
} else {
panic(err)
}
+3 -3
View File
@@ -20,8 +20,8 @@ import (
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -47,8 +47,8 @@ var listServices = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_ListServicesRequestType), body)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_ListServicesRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
+3 -3
View File
@@ -20,8 +20,8 @@ import (
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -47,8 +47,8 @@ var listTerminators = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_ListTerminatorsRequestType), body)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_ListTerminatorsRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
+10 -17
View File
@@ -17,11 +17,10 @@
package subcmd
import (
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -52,26 +51,20 @@ func removeCircuit(cmd *cobra.Command, args []string) {
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_RemoveCircuitRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_RemoveCircuitRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
}
}
}
+11 -17
View File
@@ -17,11 +17,10 @@
package subcmd
import (
"github.com/openziti/foundation/channel2"
"github.com/openziti/fabric/pb/mgmt_pb"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/spf13/cobra"
"time"
)
@@ -41,25 +40,20 @@ var removeRouter = &cobra.Command{
RouterId: args[0],
}
if body, err := proto.Marshal(request); err == nil {
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_RemoveRouterRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_RemoveRouterRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
}
} else {
panic(err)
+5 -5
View File
@@ -19,8 +19,8 @@ package subcmd
import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -43,13 +43,13 @@ var removeService = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_RemoveServiceRequestType), body)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_RemoveServiceRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
+5 -5
View File
@@ -19,8 +19,8 @@ package subcmd
import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -43,13 +43,13 @@ var removeTerminator = &cobra.Command{
if err != nil {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_RemoveTerminatorRequestType), body)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_RemoveTerminatorRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
+13 -20
View File
@@ -17,11 +17,10 @@
package subcmd
import (
"github.com/openziti/foundation/channel2"
"github.com/openziti/fabric/pb/mgmt_pb"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/spf13/cobra"
"strconv"
"time"
@@ -44,30 +43,24 @@ func setLinkCost(cmd *cobra.Command, args []string) {
if ch, err := setLinkCostClient.Connect(); err == nil {
if cost, err := strconv.Atoi(args[1]); err == nil {
request := &mgmt_pb.SetLinkCostRequest{
LinkId: args[0],
Cost: int32(cost),
LinkId: args[0],
Cost: int32(cost),
}
if body, err := proto.Marshal(request); err == nil {
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_SetLinkCostRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_SetLinkCostRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
}
} else {
panic(err)
+11 -18
View File
@@ -17,11 +17,10 @@
package subcmd
import (
"github.com/openziti/foundation/channel2"
"github.com/openziti/fabric/pb/mgmt_pb"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/spf13/cobra"
"strconv"
"time"
@@ -48,26 +47,20 @@ func setLinkDown(cmd *cobra.Command, args []string) {
Down: down,
}
if body, err := proto.Marshal(request); err == nil {
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_SetLinkDownRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_SetLinkDownRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
fmt.Printf("\nfailure [%s]\n\n", result.Message)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
}
}
} else {
+5 -5
View File
@@ -18,8 +18,8 @@ package subcmd
import (
"fmt"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -42,13 +42,13 @@ func snapshotDb(cmd *cobra.Command, args []string) {
panic(err)
}
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_SnapshotDbRequestType), nil)
responseMsg, err := ch.SendAndWaitWithTimeout(requestMsg, 5*time.Second)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_SnapshotDbRequestType), nil)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\nsuccess\n\n")
} else {
+15 -18
View File
@@ -17,11 +17,10 @@
package subcmd
import (
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/foundation/channel2"
"github.com/spf13/cobra"
"time"
)
@@ -39,7 +38,16 @@ var streamCircuitsCmd = &cobra.Command{
var streamCircuitsClient *mgmtClient
func streamCircuits(*cobra.Command, []string) {
ch, err := streamCircuitsClient.Connect()
cw := newCloseWatcher()
bindHandler := func(binding channel.Binding) error {
binding.AddTypedReceiveHandler(&circuitsHandler{})
binding.AddCloseHandler(cw)
return nil
}
ch, err := streamCircuitsClient.ConnectAndBind(channel.BindHandlerF(bindHandler))
if err != nil {
panic(err)
}
@@ -50,23 +58,12 @@ func streamCircuits(*cobra.Command, []string) {
panic(err)
}
ch.AddReceiveHandler(&circuitsHandler{})
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_StreamCircuitsRequestType), body)
waitCh, err := ch.SendAndSync(requestMsg)
if err != nil {
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_StreamCircuitsRequestType), body)
if err = requestMsg.WithTimeout(5 * time.Second).SendAndWaitForWire(ch); err != nil {
panic(err)
}
select {
case err := <-waitCh:
if err != nil {
panic(err)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
}
waitForChannelClose(ch)
cw.waitForChannelClose()
}
type circuitsHandler struct{}
@@ -75,7 +72,7 @@ func (*circuitsHandler) ContentType() int32 {
return int32(mgmt_pb.ContentType_StreamCircuitsEventType)
}
func (*circuitsHandler) HandleReceive(msg *channel2.Message, _ channel2.Channel) {
func (*circuitsHandler) HandleReceive(msg *channel.Message, _ channel.Channel) {
event := &mgmt_pb.StreamCircuitsEvent{}
err := proto.Unmarshal(msg.Body, event)
if err != nil {
+11 -8
View File
@@ -17,25 +17,28 @@
package subcmd
import (
"github.com/openziti/foundation/channel2"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/channel"
"sync"
)
func waitForChannelClose(ch channel2.Channel) {
func newCloseWatcher() *closeWatcher {
waitGroup := &sync.WaitGroup{}
waitGroup.Add(1)
ch.AddCloseHandler(&closeWatcher{waitGroup})
waitGroup.Wait()
return &closeWatcher{
waitGroup: waitGroup,
}
}
type closeWatcher struct {
waitGroup *sync.WaitGroup
}
func (watcher *closeWatcher) HandleClose(ch channel2.Channel) {
func (self *closeWatcher) HandleClose(ch channel.Channel) {
pfxlog.Logger().Info("Management channel to controller closed. Shutting down.")
watcher.waitGroup.Done()
self.waitGroup.Done()
}
func (self *closeWatcher) waitForChannelClose() {
self.waitGroup.Wait()
}
+15 -19
View File
@@ -17,13 +17,12 @@
package subcmd
import (
"github.com/openziti/foundation/channel2"
"github.com/openziti/fabric/pb/mgmt_pb"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/spf13/cobra"
"sort"
"time"
@@ -43,7 +42,15 @@ var streamMetricsCmd = &cobra.Command{
var streamMetricsClient *mgmtClient
func streamMetrics(cmd *cobra.Command, args []string) {
ch, err := streamMetricsClient.Connect()
cw := newCloseWatcher()
bindHandler := func(binding channel.Binding) error {
binding.AddTypedReceiveHandler(&metricsHandler{})
binding.AddCloseHandler(cw)
return nil
}
ch, err := streamCircuitsClient.ConnectAndBind(channel.BindHandlerF(bindHandler))
if err != nil {
panic(err)
}
@@ -64,23 +71,12 @@ func streamMetrics(cmd *cobra.Command, args []string) {
panic(err)
}
ch.AddReceiveHandler(&metricsHandler{})
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_StreamMetricsRequestType), body)
waitCh, err := ch.SendAndSync(requestMsg)
if err != nil {
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_StreamMetricsRequestType), body)
if err = requestMsg.WithTimeout(5 * time.Second).SendAndWaitForWire(ch); err != nil {
panic(err)
}
select {
case err := <-waitCh:
if err != nil {
panic(err)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
}
waitForChannelClose(ch)
cw.waitForChannelClose()
}
type metricsHandler struct{}
@@ -89,7 +85,7 @@ func (*metricsHandler) ContentType() int32 {
return int32(mgmt_pb.ContentType_StreamMetricsEventType)
}
func (*metricsHandler) HandleReceive(msg *channel2.Message, ch channel2.Channel) {
func (*metricsHandler) HandleReceive(msg *channel.Message, ch channel.Channel) {
response := &mgmt_pb.StreamMetricsEvent{}
err := proto.Unmarshal(msg.Body, response)
if err != nil {
+13 -19
View File
@@ -17,12 +17,11 @@
package subcmd
import (
"github.com/openziti/foundation/channel2"
"github.com/openziti/fabric/pb/mgmt_pb"
trace_pb "github.com/openziti/foundation/trace/pb"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
trace_pb "github.com/openziti/foundation/trace/pb"
"github.com/spf13/cobra"
"time"
)
@@ -65,26 +64,21 @@ func togglePipeTraces(cmd *cobra.Command, args []string) {
}
if body, err := proto.Marshal(request); err == nil {
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_TogglePipeTracesRequestType), body)
waitCh, err := ch.SendAndWait(requestMsg)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_TogglePipeTracesRequestType), body)
responseMsg, err := requestMsg.WithTimeout(5 * time.Second).SendForReply(ch)
if err != nil {
panic(err)
}
select {
case responseMsg := <-waitCh:
if responseMsg.ContentType == channel2.ContentTypeResultType {
result := channel2.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\ntracing enabled successfully\n\n")
fmt.Println(result.Message)
} else {
fmt.Printf("\ntracing enable failured [%s]\n\n", result.Message)
}
if responseMsg.ContentType == channel.ContentTypeResultType {
result := channel.UnmarshalResult(responseMsg)
if result.Success {
fmt.Printf("\ntracing enabled successfully\n\n")
fmt.Println(result.Message)
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
fmt.Printf("\ntracing enable failured [%s]\n\n", result.Message)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
} else {
panic(fmt.Errorf("unexpected response type %v", responseMsg.ContentType))
}
} else {
panic(err)
+67 -18
View File
@@ -17,15 +17,16 @@
package subcmd
import (
"errors"
"encoding/json"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/ctrl_pb"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/fabric/router/xgress"
"github.com/openziti/foundation/channel2"
"github.com/openziti/foundation/trace/pb"
"github.com/spf13/cobra"
"reflect"
"sort"
"time"
)
@@ -72,7 +73,15 @@ func streamTraces(_ *cobra.Command, args []string) {
}
}
ch, err := streamTracesClient.Connect()
cw := newCloseWatcher()
bindHandler := func(binding channel.Binding) error {
binding.AddTypedReceiveHandler(&traceHandler{})
binding.AddCloseHandler(cw)
return nil
}
ch, err := streamCircuitsClient.ConnectAndBind(channel.BindHandlerF(bindHandler))
if err != nil {
panic(err)
}
@@ -82,22 +91,13 @@ func streamTraces(_ *cobra.Command, args []string) {
panic(err)
}
ch.AddReceiveHandler(&traceHandler{})
requestMsg := channel2.NewMessage(int32(mgmt_pb.ContentType_StreamTracesRequestType), body)
requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_StreamTracesRequestType), body)
waitCh, err := ch.SendAndSync(requestMsg)
if err != nil {
if err = requestMsg.WithTimeout(5 * time.Second).SendAndWaitForWire(ch); err != nil {
panic(err)
}
select {
case err := <-waitCh:
if err != nil {
panic(err)
}
case <-time.After(5 * time.Second):
panic(errors.New("timeout"))
}
waitForChannelClose(ch)
cw.waitForChannelClose()
}
func getContentType(name string) (int32, error) {
@@ -141,7 +141,7 @@ func (*traceHandler) ContentType() int32 {
return int32(mgmt_pb.ContentType_StreamTracesEventType)
}
func (*traceHandler) HandleReceive(msg *channel2.Message, ch channel2.Channel) {
func (*traceHandler) HandleReceive(msg *channel.Message, _ channel.Channel) {
event := &trace_pb.ChannelMessage{}
err := proto.Unmarshal(msg.Body, event)
if err != nil {
@@ -156,10 +156,59 @@ func (*traceHandler) HandleReceive(msg *channel2.Message, ch channel2.Channel) {
if event.ReplyFor != -1 {
replyFor = fmt.Sprintf(">%d", event.ReplyFor)
}
meta := channel2.DecodeTraceAndFormat(event.Decode)
meta := DecodeTraceAndFormat(event.Decode)
if meta == "" {
meta = fmt.Sprintf("missing decode, content-type=%v", event.ContentType)
}
fmt.Printf("%8d: %-16s %8s %s #%-5d %5s | %s\n",
event.Timestamp, event.Identity, event.Channel, flow, event.Sequence, replyFor, meta)
}
func DecodeTraceAndFormat(decode []byte) string {
if len(decode) > 0 {
meta := make(map[string]interface{})
err := json.Unmarshal(decode, &meta)
if err != nil {
panic(err)
}
out := fmt.Sprintf("%-24s", fmt.Sprintf("%-8s %s", meta[channel.DecoderFieldName], meta[channel.MessageFieldName]))
if len(meta) > 2 {
keys := make([]string, 0)
for k := range meta {
if k != channel.DecoderFieldName && k != channel.MessageFieldName {
keys = append(keys, k)
}
}
sort.Strings(keys)
out += " {"
for i := 0; i < len(keys); i++ {
k := keys[i]
if i > 0 {
out += " "
}
out += k
out += "=["
v := meta[k]
switch v.(type) {
case string:
out += v.(string)
case float64:
out += fmt.Sprintf("%0.0f", v.(float64))
case bool:
out += fmt.Sprintf("%t", v.(bool))
default:
out += fmt.Sprintf("<%s>", reflect.TypeOf(v))
}
out += "]"
}
out += "}"
}
return out
} else {
return ""
}
}
+9 -8
View File
@@ -17,12 +17,13 @@
package trace
import (
"github.com/openziti/foundation/channel2"
"github.com/openziti/foundation/trace"
"github.com/openziti/foundation/trace/pb"
"encoding/json"
"errors"
"fmt"
"github.com/openziti/channel"
"github.com/openziti/foundation/trace"
"github.com/openziti/foundation/trace/pb"
"github.com/openziti/ziti/ziti-fabric/subcmd"
"github.com/spf13/cobra"
)
@@ -80,7 +81,7 @@ func (h *dumpHandler) Handle(msg interface{}) error {
if t.ReplyFor != -1 {
replyFor = fmt.Sprintf(">%d", t.ReplyFor)
}
fmt.Printf("%8s: %-16s %8s %s #%-5d %5s | %s\n", h.formatTimestamp(t.Timestamp), t.Identity, t.Channel, flow, t.Sequence, replyFor, channel2.DecodeTraceAndFormat(t.Decode))
fmt.Printf("%8s: %-16s %8s %s #%-5d %5s | %s\n", h.formatTimestamp(t.Timestamp), t.Identity, t.Channel, flow, t.Sequence, replyFor, subcmd.DecodeTraceAndFormat(t.Decode))
} else {
h.formatTimestamp(t.Timestamp)
@@ -99,7 +100,7 @@ func (h *dumpHandler) formatTimestamp(timestamp int64) string {
h.lastTimestamp = timestamp
return "0"
}
out := fmt.Sprintf("%d", (timestamp - h.lastTimestamp) / 1000)
out := fmt.Sprintf("%d", (timestamp-h.lastTimestamp)/1000)
h.lastTimestamp = timestamp
return out
}
@@ -115,13 +116,13 @@ func filterMatch(trace *trace_pb.ChannelMessage) (bool, error) {
channelMatch := true
if dumpCmdDecoderFilter != "" {
channelMatch = dumpCmdDecoderFilter == meta[channel2.DecoderFieldName]
channelMatch = dumpCmdDecoderFilter == meta[channel.DecoderFieldName]
}
messageMatch := true
if dumpCmdMessageFilter != "" {
messageMatch = dumpCmdMessageFilter == meta[channel2.MessageFieldName]
messageMatch = dumpCmdMessageFilter == meta[channel.MessageFieldName]
}
return channelMatch && messageMatch, nil
}
}