Show
Ignore:
Timestamp:
08/04/08 02:12:25 (10 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1217815945 +0000
git-parent:

[3be398539c4bcd0e77acf4390c6dda1635329b58]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1217815945 +0000
Message:

oh my word... basic function, refs #49

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check.h

    r5e653fe r7180374  
    1414#include "eventer/eventer.h" 
    1515#include "utils/noit_hash.h" 
     16#include "utils/noit_skiplist.h" 
    1617#include "noit_conf.h" 
    1718#include "noit_console.h" 
     
    3435 */ 
    3536 
    36 #define NP_RUNNING  0x00000001 
    37 #define NP_KILLED   0x00000002 
    38 #define NP_DISABLED 0x00000004 
    39 #define NP_UNCONFIG 0x00000008 
     37#define NP_RUNNING   0x00000001 
     38#define NP_KILLED    0x00000002 
     39#define NP_DISABLED  0x00000004 
     40#define NP_UNCONFIG  0x00000008 
     41#define NP_TRANSIENT 0x00000010 
    4042 
    4143#define NP_UNKNOWN '0'             /* stats_t.{available,state} */ 
     
    98100  u_int32_t period;            /* period of checks in milliseconds */ 
    99101  u_int32_t timeout;           /* timeout of check in milliseconds */ 
    100   u_int32_t flags;             /* NP_KILLED, NP_RUNNING */ 
     102  u_int32_t flags;             /* NP_KILLED, NP_RUNNING, NP_TRANSIENT */ 
    101103 
    102104  dep_list_t *causal_checks; 
     
    109111  u_int32_t generation;        /* This can roll, we don't care */ 
    110112  void *closure; 
     113 
     114  noit_skiplist *feeds; 
    111115} noit_check_t; 
    112116 
     
    152156 
    153157API_EXPORT(int) 
     158  noit_check_activate(noit_check_t *check); 
     159 
     160API_EXPORT(int) 
    154161  noit_poller_deschedule(uuid_t in); 
    155162 
     
    178185  noit_stats_snprint_metric(char *b, int l, metric_t *m); 
    179186 
     187API_EXPORT(noit_check_t *) 
     188  noit_check_clone(uuid_t in); 
     189API_EXPORT(noit_check_t *) 
     190  noit_check_watch(uuid_t in, int period); 
     191API_EXPORT(noit_check_t *) 
     192  noit_check_get_watch(uuid_t in, int period); 
     193API_EXPORT(void) 
     194  noit_check_transient_add_feed(noit_check_t *check, const char *feed); 
     195API_EXPORT(void) 
     196  noit_check_transient_remove_feed(noit_check_t *check, const char *feed); 
     197 
    180198/* These are from noit_check_log.c */ 
    181199API_EXPORT(void) noit_check_log_check(noit_check_t *check);