diff options
Diffstat (limited to 'src/dbrw.h')
-rw-r--r-- | src/dbrw.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,3 @@ /* This file is part of vmod-dbrw - Copyright (C) 2013-2017 Sergey Poznyakoff + Copyright (C) 2013-2018 Sergey Poznyakoff @@ -45,2 +45,3 @@ struct dbrw_backend { unsigned); + int (*sql_idle_timeout)(struct dbrw_connection *); }; @@ -68,2 +69,3 @@ struct dbrw_config { char status[HTTP_STATUS_LEN+1]; + int idle_timeout; VTAILQ_ENTRY(dbrw_config) list; @@ -79,3 +81,4 @@ struct dbrw_connection { size_t matchsize; /* Total number of entries in match map */ - void *data; /* Backend-specific data */ + time_t timestamp; /* Last used at */ + void *data; /* Backend-specific data */ VTAILQ_ENTRY(dbrw_connection) list; @@ -107,2 +110,3 @@ void sql_destroy(struct dbrw_connection *pd); const char *sql_get_column(struct dbrw_connection *pd, unsigned row, unsigned col); +int sql_idle_timeout(struct dbrw_connection *conn); |