Commit Graph

27 Commits

Author SHA1 Message Date
Neil Alexander
b67c313f44
Admin socket and yggdrasilctl improvements
This refactors the request parsing, as well as improving the output for some request types. It also tweaks `yggdrasilctl` output, which should help with #947.
2022-09-24 12:22:38 +01:00
Neil Alexander
dc9720e580 Extend getSessions admin call to include uptime/TX/RX 2022-09-03 16:55:57 +01:00
Neil Alexander
c6fe81b5d2
Admin socket and yggdrasilctl refactoring (#939) 2022-09-03 10:50:43 +01:00
Rubikoid
c19319df5e Fix coords print 2022-05-03 11:40:19 +03:00
Alex Kotov
cbb6dc1b7d
Split yggdrasilctl code into separate functions (refactoring) (#815)
* Move yggdrasilctl responses to separate functions

* Move yggdrasilctl request switch to separate function

* Add empty lines

* Create struct CmdLine for yggdrasilctl

* Move yggdrasilctl command line parsing to separate func

* Turn struct CmdLine into CmdLineEnv

* Rename func parseCmdLine to parseFlagsAndArgs

* Move yggdrasilctl endpoint setting logic into separate func

* Function to create yggdrasilctl CmdLineEnv

* Reorder code

* Move struct fields into lines

* Turn yggdrasilctl CmdLineEnv funcs to methods

* Move yggdrasilctl connection code to separate func

* Rename functions

* Move yggdrasilctl command line env to separate mod

* Move yggdrasilctl command line env to main mod

* Run goimports

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-08-02 22:47:38 +01:00
Neil Alexander
d46a883020 Include public key in yggdrasilctl getSelf output for v0.4 nodes 2021-06-05 21:54:05 +01:00
Neil Alexander
ea15eeee7e Ensure PublicKey option is unused, map old config options 2021-06-05 21:32:04 +01:00
Neil Alexander
8932ab0519 Fix lint errors 2021-06-02 14:40:09 +01:00
Ryan Westlund
d6d2d9c19a
Accept some golint suggestions (#690)
* Fixed some linter issues

* Simplified isBetter method

* Accept some linter suggestions

* Fix typo

Co-authored-by: klesomik <klesomiks@gmail.com>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2020-09-27 14:42:46 +01:00
Arceliar
5bd9391c61 slightly cleaner way for yggdrasilctl to os.exit, making sure defers are called 2019-12-25 17:45:24 -06:00
Neil Alexander
02bfe28399
Minor tweaks 2019-08-14 20:09:02 +01:00
Slex
589ad638ea Implement feature from https://github.com/yggdrasil-network/yggdrasil-go/issues/488 2019-08-11 00:31:22 +03:00
Neil Alexander
78eb40cbad
Record session uptime (purely for the admin socket) 2019-05-29 12:59:36 +01:00
Neil Alexander
160e01e84f
Searches called from api.go, various other tweaks, searches now have a callback for success/failure, node ID now reported by admin socket 2019-04-18 23:38:23 +01:00
Neil Alexander
3bc3002fff
Add handlers for setTunnelRouting/getTunnelRouting 2019-03-06 17:37:48 +00:00
Neil Alexander
ad7e392afe
Fix getRoutes (#339) 2019-03-06 17:32:25 +00:00
Neil Alexander
b20c3538b7
Point hjson to master repo following comments merge 2018-12-17 10:50:57 +00:00
Neil Alexander
422424af64
Don't panic 2018-12-17 10:19:20 +00:00
Neil Alexander
83d734e109
Make yggdrasilctl less crashy 2018-12-17 10:17:16 +00:00
Neil Alexander
98a544fd7d
Fix bug in yggdrasilctl where -endpoint gets ignored 2018-12-15 11:48:43 +00:00
Neil Alexander
c78e1b98cc
Show yggdrasilctl log buffer on panic 2018-12-10 11:29:42 +00:00
Neil Alexander
b4b3609678
Really use the correct endpoint 2018-12-10 11:12:40 +00:00
Neil Alexander
d29b5a074a
Try to use default config file location to find AdminListen when yggdrasilctl is not given an endpoint 2018-12-10 11:09:10 +00:00
Neil Alexander
cd11d2eccd
Produce more meaningful logging from yggdrasilctl when things go wrong 2018-12-10 10:54:41 +00:00
Neil Alexander
ba4507c02e
Update yggdrasilctl help (fixes #194) 2018-12-09 13:33:18 +00:00
Neil Alexander
02f98a2592
Only show build name and version if it is known 2018-12-08 11:01:05 +00:00
Arceliar
586781b49c convert to go module 2018-12-07 19:56:04 -06:00