diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-12-27 22:51:46 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-12-27 22:51:46 +0100 |
commit | 6e409ce10d134625626d1eddfd6152755ef1908d (patch) | |
tree | 8d5f01db6a8c82a8ebd19d4ade008eeb21e1ff8d /src/journal/journal-rate-limit.h | |
parent | fe6521272ba203ec8f0d5a94f0729960b3f90525 (diff) |
journald: implement sophisticated rate limiting
Diffstat (limited to 'src/journal/journal-rate-limit.h')
-rw-r--r-- | src/journal/journal-rate-limit.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/journal/journal-rate-limit.h b/src/journal/journal-rate-limit.h new file mode 100644 index 0000000000..2bbdd5f9fe --- /dev/null +++ b/src/journal/journal-rate-limit.h @@ -0,0 +1,34 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#ifndef foojournalratelimithfoo +#define foojournalratelimithfoo + +/*** + This file is part of systemd. + + Copyright 2011 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with systemd; If not, see <http://www.gnu.org/licenses/>. +***/ + +#include "macro.h" +#include "util.h" + +typedef struct JournalRateLimit JournalRateLimit; + +JournalRateLimit *journal_rate_limit_new(usec_t interval, unsigned burst); +void journal_rate_limit_free(JournalRateLimit *r); +int journal_rate_limit_test(JournalRateLimit *r, const char *id, int priority, uint64_t available); + +#endif |