Jimmy Zelinskie
129aac230a
cmd: use os.SignalContext for signal management
...
This fixes a `go vet` failure for using an unbuffered channel with
os.Signal. This also simplifies platform-specific code.
GoFmt added new forward-compatible build tags.
2022-01-02 15:26:05 -05:00
Jimmy Zelinskie
456f9de190
pkg/metrics: move profiles into the metrics server
...
This change:
- renames pkg/prometheus into pkg/metrics
- renames the prometheus_addr config to metrics_addr
- adds pprof endpoints to the metrics server
- removes profile/trace cli flags
- adds endpoints for profiling to the metrics server
2021-02-27 12:49:24 -05:00
Justin Li
d95120c817
Return []error from Stop() channel, allow recursive stop groups
2018-09-09 11:30:15 -04:00
Jimmy Zelinskie
3aa7d1a91d
cmd: add e2e command
...
This change unifies chihaya and chihaya-e2e binaries.
It also vendors the code missing from the project that was used in
chihaya-e2e.
Fixes #402 .
2018-09-04 11:38:22 -04:00
Jimmy Zelinskie
17f22e77a3
cmd/chihaya: add tracing flag
2018-07-03 23:14:33 -04:00
Jimmy Zelinskie
7dbbc86380
middleware: add a registration model
2017-12-29 16:55:48 -05:00
Jimmy Zelinskie
2bead6b7b4
cmd/chihaya: pull out pre and post funcs
2017-12-29 16:55:48 -05:00
Leo Balduf
35d146f675
cmd/chihaya: make things work on windows
2017-12-05 10:14:12 +01:00
Leo Balduf
79750ef983
cmd/chihaya: clean up logging
2017-09-19 21:27:52 +02:00
Leo Balduf
c7b052dbb2
cmd/chihaya: log which storage is in use
2017-09-03 19:51:29 +02:00
Jimmy Zelinskie
034aa0b5dc
glide: update dependencies
...
This change also moves the logrus library to the lowercase import in
order to avoid breaking downstream projects vendoring chihaya.
2017-07-03 18:57:13 -04:00
Leo Balduf
8ed171b0ea
pkg/log: create wrapper around logrus
2017-06-26 20:46:40 +02:00
Jimmy Zelinskie
effb05103a
cmd/chihaya: remove extra registration of storages
2017-06-04 16:42:32 -04:00
Jimmy Zelinskie
7786e1a915
storage: enforce all peer stores are loggable
2017-06-04 16:06:01 -04:00
Jimmy Zelinskie
c37311e8c7
cmd/chihaya: register storage drivers
2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
496cc1a31d
storage: dynamically register drivers
2017-06-03 15:47:58 -04:00
Cedric Charly
86197a258c
cmd/chihaya: log hook names on startup
...
Replace logging memory addresses with actual hook names.
Closes #317
2017-06-02 20:56:29 -05:00
Jimmy Zelinskie
d026a3359c
cmd/chihaya: move cpuprofile into postrun
...
This also updates PreRuns to return their errors.
2017-05-07 18:52:17 -04:00
Jimmy Zelinskie
1daee323a3
cmd/chihaya: add --json flag
...
This flag enables logging as JSON.
2017-05-07 04:38:31 -04:00
Jimmy Zelinskie
cb55019ab8
*: add structured logging
2017-05-07 04:30:22 -04:00
Jimmy Zelinskie
7b1e7e8c99
cmd/chihaya: s/chihayaCfg/cfg
2017-05-02 11:03:49 -04:00
Jimmy Zelinskie
23e9719073
cmd/chihaya: refactor out combination of errors
2017-05-01 15:57:01 -04:00
Jimmy Zelinskie
68cbe0fc21
cmd/chihaya: persist PeerStore across reloads
2017-05-01 15:56:38 -04:00
Jimmy Zelinskie
ea0dba3a3d
cmd/chihaya: refactor root run command
...
This change refactors a bunch of the state of execution into its own
object. It also attempts to simplify stopping and adjusts some other
packages to integrate with the stopper interface.
Fixes #309 .
2017-05-01 15:56:38 -04:00
Jimmy Zelinskie
842bec32e7
cmd/chihaya: move enabling debug
...
PersistentPreRun is the more idiomatic place for this code to run when
using spf13/cobra.
2017-04-29 22:51:54 -04:00
Leo Balduf
2e625af44d
http: fix HTTP shutdown panicking
2017-04-04 22:34:53 +02:00
Jimmy Zelinskie
fceee10aba
cmd: fix spelling mistake
2017-01-22 19:06:13 -05:00
Leo Balduf
6b1d4c7ed5
cmd/chihaya: add config reloading via SIGUSR1
...
Fixes #215
2016-11-28 23:48:00 +01:00
Leo Balduf
86ebb108fc
cmd/chihaya: stop hooks
...
Fixes #214 .
2016-09-24 19:51:18 -04:00
Jimmy Zelinskie
486e898ce9
cmd: add --debug for debug logging
2016-09-05 12:20:15 -04:00
Jimmy Zelinskie
fa32839623
replace std log w/ logrus
...
There still needs to be much more logged with the debug level.
2016-09-05 12:10:42 -04:00
Jimmy Zelinskie
e39da6b4e6
main: add CreateHooks() method for ConfigFile
...
This change simplifies middleware.Logic to having only one list of
PreHooks and one list of PostHooks.
2016-09-01 19:48:49 -04:00
Jimmy Zelinskie
9dc5372796
cmd: pull closure out into its own func
...
Also introduce a config.go.
2016-08-24 20:01:06 -04:00
Leo Balduf
0e0f8e7ad1
cmd/chihaya: clean up
2016-08-20 10:21:10 -04:00
Jimmy Zelinskie
cc6614c474
rename back to chihaya
2016-08-16 22:17:10 -04:00
Jimmy Zelinskie
1bff8d1571
delete old code
2016-08-16 22:17:10 -04:00
Leo Balduf
0910d2ccab
general: add CPU profiling
2016-08-01 16:51:48 -04:00
Leo Balduf
aaf9978df3
middleware: add swarm interaction
2016-05-17 00:49:16 -04:00
Leo Balduf
0607841b3b
middleware: added varinterval
2016-04-06 11:33:14 -04:00
Jimmy Zelinskie
35df7a29bc
main: organize imports by server, middleware
2016-04-04 00:27:30 -04:00
Leo Balduf
9c1168746a
hotfix: initialized scrape map
2016-04-02 20:23:42 -04:00
Leo Balduf
52483407cc
middleware: added infohash middleware
2016-04-02 18:47:51 -04:00
Leo Balduf
6440f91a8e
middleware: added deniability
2016-04-02 17:19:33 -04:00
Jimmy Zelinskie
33d6b1cd12
implement prometheus server
2016-03-02 21:05:33 -05:00
Jimmy Zelinskie
0dfc26caea
remove config package
2016-03-02 21:05:33 -05:00
Leo Balduf
730de81b9f
cmd/chihaya: added useful dependencies
2016-03-02 21:05:33 -05:00
Leo Balduf
50192d45c1
middleware: added IP blacklist/whitelist middlewares
2016-03-02 21:05:31 -05:00
Justin Li
75b4a20e56
Bring in more old behaviour, use types for peer_id and infohash
2016-03-02 21:05:31 -05:00
Jimmy Zelinskie
bd33c0c66b
initial middleware refactor
2016-03-02 21:05:30 -05:00
Jimmy Zelinskie
5c27c960f0
clean the slate!
2016-03-02 21:05:30 -05:00