Commit Graph

199 Commits

Author SHA1 Message Date
e2ac0ad45e Add link to documentation 2023-12-26 16:43:05 +01:00
aac8b11a01 Add miter package 2023-12-26 16:39:56 +01:00
c76720dffa Add nix flake for development 2023-12-26 16:28:34 +01:00
9567a98606 Move massert into internal, and simplify it a lot
The previous massert isn't that useful compared to testify, but it's
nice to have some assertion helpers in the repo which don't require a
sub-dependency.
2023-12-26 16:27:41 +01:00
7f1cf24293 Change LICENSE to WTFPL 2023-12-26 16:05:30 +01:00
47c8c5b850 mlog: Make default message handler human readable
The JSON message handler is left as a separate implementation, for any
that want to use it.
2023-09-10 15:12:30 +02:00
Brian Picciano
07f3889a70 mlog: MaxLevel method 2022-11-13 16:11:54 +01:00
Brian Picciano
ec5e2441c6 mlog: Add WithMaxLevel method 2022-11-13 16:05:23 +01:00
Brian Picciano
cbeee71cb1 Add FatalString method, make Fatal take an error 2022-05-05 19:17:45 -06:00
Brian Picciano
ba9bc6c46c refactor mlog and merr to handle and format error messages better 2021-04-09 18:05:07 -06:00
Brian Picciano
360d41e2b8 Refactor merr, remove almost everything else 2021-04-09 17:30:59 -06:00
Brian P
3e2713a850 Get rid of mcmp, and lots of subsequent refactors
Getting rid of mcmp pretty much breaks this whole package, but this
commit makes a good start on fixing all the things worth keeping.
2021-02-07 16:04:41 -07:00
Brian Picciano
c20f884d68 mredis: fix how Block was being used, it wasn't being converted to an int properly 2019-07-29 23:39:08 -04:00
Brian Picciano
0b5b5aac00 mredis: check for pending messages during the init stage 2019-07-29 23:31:58 -04:00
Brian Picciano
4d859c6d02 mredis: implement Stream helper type 2019-07-29 23:24:38 -04:00
Brian Picciano
df01ccffcb mrand: implement NewSyncRand and use that for DefaultRand, to make it thread-safe 2019-07-29 23:24:04 -04:00
Brian Picciano
0e64f16f03 mredis: initial implementation 2019-07-16 00:42:01 -04:00
Brian Picciano
d54954cd8e mrun: use mcmp.SeriesGetElement to iterate through hooks, so that hooks which get added while the iteration is happening (e.g. from CLISubCommand) can still get hit 2019-07-09 20:54:31 -04:00
Brian Picciano
de56d14739 mcmp: implement SeriesGetElement 2019-07-09 20:53:27 -04:00
Brian Picciano
b2aa2f73bd mnet: fix error handling during listen, to prevent a panic when a socket is taken 2019-07-09 19:54:58 -04:00
Brian Picciano
398d887514 mpubsub: refactor to use components 2019-06-23 12:56:03 -06:00
Brian Picciano
b0ee70e585 msql: refactor to use components 2019-06-23 12:55:55 -06:00
Brian Picciano
f5b0e8e577 mdb: refactor to use Components 2019-06-23 12:55:40 -06:00
Brian Picciano
ecafe2922a mnet: fix some comments 2019-06-23 12:55:27 -06:00
Brian Picciano
4791c02122 mcfg: implement ParamDefaultOrRequired 2019-06-23 12:55:11 -06:00
Brian Picciano
481b3668c3 m: fix tests after having modified initializing logging 2019-06-23 11:43:54 -06:00
Brian Picciano
1a6b8e3166 mlog: clean up component code and add tests for it 2019-06-23 11:39:36 -06:00
Brian Picciano
752e266685 mcmp: make InheritedValue a function, not a method, and add Parent method to support it 2019-06-23 11:17:48 -06:00
Brian Picciano
6cd61c60f7 add root Dockerfile which will build all binaries 2019-06-18 00:12:54 -04:00
Brian Picciano
7a5ac9caa0 totp-proxy: refactor to use new Component logic 2019-06-17 18:18:50 -04:00
Brian Picciano
e91ef01857 m: refactor to use new Component stuff, and make the log logic a bit better 2019-06-17 17:56:14 -04:00
Brian Picciano
e741e79acf mhttp: refactor to use Components 2019-06-17 17:14:00 -04:00
Brian Picciano
d0ba23ac7b mnet: refactor to use Components 2019-06-17 17:13:49 -04:00
Brian Picciano
7eac20f58b mlog: refactor From to include Component's Context implicitly 2019-06-17 16:51:25 -04:00
Brian Picciano
7f9b0d5591 mcmp: make thread-safe, add InheritedValue, refactor Context/Annotation related methods 2019-06-17 16:51:25 -04:00
Brian Picciano
dedf3a0368 mcmp: rename GetSeries* functions to just Series* 2019-06-15 17:52:55 -06:00
Brian Picciano
af836c1cab mtest: refactor to use Component instead of Context 2019-06-15 17:51:04 -06:00
Brian Picciano
31ed0fe625 mrun: fix Threads after changes to mctx which got rid of children 2019-06-15 17:41:20 -06:00
Brian Picciano
8bd0664ba0 mlog: refactor to use Components instead of Contexts for storing Logger 2019-06-15 17:35:17 -06:00
Brian Picciano
467bcbe52d mctx: refactor to no longer have parent/child logic 2019-06-15 17:28:29 -06:00
Brian Picciano
c98f154992 mrun: refactor hooks to use Components 2019-06-15 17:13:00 -06:00
Brian Picciano
dd2d601081 mcfg: refactor so as to use new mcmp.Component type, and use the option pattern to reduce number of arguments to parameters 2019-06-15 16:45:53 -06:00
Brian Picciano
a30edfb5f9 mcmp: initial implementation, intention is to use Component instead of Context for all component instantiation 2019-06-15 16:45:26 -06:00
Brian Picciano
e9b7f24dba mcfg: update docs 2019-05-18 12:50:04 -06:00
Brian Picciano
60ea7d98eb mrun: update docs 2019-05-18 12:36:53 -06:00
Brian Picciano
d5044ad7cb mctx: add Annotated and polish documentation 2019-05-18 12:15:35 -06:00
Brian Picciano
a07df614d8 mcfg: make sure Populate never returns a nil context 2019-04-29 20:58:13 -04:00
Brian Picciano
8db9e78e08 mcfg: add WithFloat64 and WithRequiredFloat64 2019-04-20 16:49:12 -04:00
Brian Picciano
f4ad383c4a m: have log level depend on the kind of Context is being used (process or service) 2019-04-06 16:30:55 -04:00
Brian Picciano
507c359997 mcfg: modify WithCLITail to allow modifying the Usage description 2019-04-06 15:07:37 -04:00