| 1 | /* |
| 2 | * This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 | * |
| 6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _DISCOVERYRUNNER_H |
| 10 | #define _DISCOVERYRUNNER_H 1 |
| 11 | |
| 12 | #include "msabaoth.h" |
| 13 | |
| 14 | void broadcast(char *msg); |
| 15 | void registerMessageTap(int fd); |
| 16 | void unregisterMessageTap(int fd); |
| 17 | void *discoveryRunner(void *d); |
| 18 | |
| 19 | typedef struct _remotedb { |
| 20 | char *dbname; /* remote database name */ |
| 21 | char *tag; /* database tag, if any, default = "" */ |
| 22 | char *fullname; /* dbname + tag */ |
| 23 | char *conn; /* remote connection, use in redirect */ |
| 24 | int ttl; /* time-to-live in seconds */ |
| 25 | struct _remotedb* next; |
| 26 | }* remotedb; |
| 27 | |
| 28 | sabdb *getRemoteDB(char *database); |
| 29 | |
| 30 | extern remotedb _mero_remotedbs; |
| 31 | extern pthread_mutex_t _mero_remotedb_lock; |
| 32 | |
| 33 | #endif |
| 34 | |
| 35 | /* vim:set ts=4 sw=4 noexpandtab: */ |
| 36 | |