]>
git.proxmox.com Git - mirror_ovs.git/blob - ovsdb/replication.h
2 * (c) Copyright 2016 Hewlett Packard Enterprise Development LP
3 * Copyright (c) 2009, 2010, 2012, 2013 Nicira, Inc.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 #define REPLICATION_H 1
24 /* Replication module runs when OVSDB server runs in the backup mode.
29 * - replication_init() needs to be called whenever OVSDB server switches into
32 * - replication_add_local_db() should be called immediately after to add all
33 * known database that OVSDB server owns, one at a time.
35 * - replication_destroy() should be called when OVSDB server shutdown to
38 * - replication_run(), replication_wait(), replication_is_alive() and
39 * replication_get_last_error() should be call within the main loop
40 * whenever OVSDB server runs in the backup mode.
42 * - set_blacklist_tables(), get_blacklist_tables(),
43 * disconnect_active_server() and replication_usage() are support functions
44 * used mainly by uinxctl commands.
47 #define REPLICATION_DEFAULT_PROBE_INTERVAL 60000
49 void replication_init(const char *sync_from
, const char *exclude_tables
,
50 const struct uuid
*server
, int probe_interval
);
51 void replication_run(void);
52 void replication_wait(void);
53 void replication_destroy(void);
54 void replication_usage(void);
55 void replication_add_local_db(const char *databse
, struct ovsdb
*db
);
56 bool replication_is_alive(void);
57 int replication_get_last_error(void);
58 char *replication_status(void);
59 void replication_set_probe_interval(int);
61 char *set_blacklist_tables(const char *blacklist
, bool dryrun
)
62 OVS_WARN_UNUSED_RESULT
;
63 char *get_blacklist_tables(void) OVS_WARN_UNUSED_RESULT
;
64 void disconnect_active_server(void);
66 #endif /* ovsdb/replication.h */