about summary refs log tree commit diff
path: root/util.h
Commit message (Collapse)AuthorAgeFilesLines
* move read_file_at to util.cLeah Neukirchen2024-06-071-0/+3
|
* Make `bbuf_get` result non-const, and add `bbuf_free`.Heikki Kallasjoki2018-12-231-1/+3
| | | | | | | | | | It's reasonable to want to modify the contents of the buffer in other ways than just plain appending, and the storage is already guaranteed contiguous. Drop the `const` from the `bbuf_get` return type, so it can be used to modify bytes in-place. The parallel request processing code may need to actually deallocate buffers as well, so add a `bbuf_free` function.
* Rename `cbuf` to `bbuf` in byte buffer utilities.Heikki Kallasjoki2018-12-221-10/+10
| | | | | The `cbuf_alloc` and `cbuf_free` functions conflict with the OpenWrt `libubox` library naming.
* Add a simple test harness and tests for the cpu collector.Heikki Kallasjoki2018-12-121-0/+5
|
* Add doc comments for the functions in util.h.Heikki Kallasjoki2018-12-041-0/+39
|
* Add support for matching with prefix in include/exclude lists.Heikki Kallasjoki2018-11-301-0/+1
|
* Add Apache License 2.0 headers and files.Heikki Kallasjoki2018-11-301-0/+16
|
* Remove prometheus- prefix from project name.Heikki Kallasjoki2018-11-301-3/+3
|
* Bugfix: cbuf_cmp handled prefixes incorrectly.Heikki Kallasjoki2018-11-161-0/+1
| | | | | | | The previous version returned 0 if the string to compare was either equal to or a prefix of the target buffer. This change fixes it to only return 0 when the string is actually equal. Otherwise, it follows the shortlex ordering, for convenience.
* Add rudimentary (fake) HTTP server.Heikki Kallasjoki2018-11-161-0/+2
|
* Initial prototype.Heikki Kallasjoki2018-08-051-0/+62