https://github.com/lovasko/libcoat
GoatSwim C89 Client Library
https://github.com/lovasko/libcoat
Last synced: about 1 year ago
JSON representation
GoatSwim C89 Client Library
- Host: GitHub
- URL: https://github.com/lovasko/libcoat
- Owner: lovasko
- License: bsd-2-clause
- Created: 2016-10-15T18:00:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-05T18:07:42.000Z (over 9 years ago)
- Last Synced: 2025-02-16T19:48:24.870Z (over 1 year ago)
- Language: C
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libcoat
The `libcoat` a client-side library for the
[GoatSwim](https://github.com/lovasko/goat) time series database.
## Features
* fully C89/POSIX2001 compatible
* API contains only 4 functions
* optional buffering to reduce the number of `write` calls
* optional custom memory management
* no loops used (guaranteed non-blocking flow)
## Example
The following [example](examples/load.c) will collect the system load over
the last minute and write it to the disk in a GoatSwim raw format:
```c
#include
#include
#include
int
main(void)
{
coat c;
double avg;
coat_open(&c, "load.gs", NULL, 0);
while (1) {
getloadavg(&avg, 1);
coat_write(&c, (float)avg);
sleep(60);
}
return EXIT_SUCCESS;
}
```
## Build & install
```
$ make
$ make install
```
## License
The `libcoat` library is licensed under the [2-clause BSD
license](LICENSE). In case, for any reason, you need a different license,
feel free to contact the author.
## Author
Daniel Lovasko