MXS-922: Serialize created servers
When a server is created via MaxAdmin, it will be serialized to disk. This allows created servers to be retained through a restart of MaxScale. Currently, all serialized objects are stored in one folder and there is no structure in the created files. In the future, servers could be created under a `servers` subdirectory so that it is easier to see what was added. Whether there is a need for this will be seen.
This commit is contained in:
@ -234,13 +234,12 @@ extern void server_update_ssl(SERVER *server, const char *key, const char *value
|
||||
* @brief Serialize a server to a file
|
||||
*
|
||||
* This converts @c server into an INI format file. This allows created servers
|
||||
* to be persisted to disk. A new file is only created if the file pointed by
|
||||
* @c filename does not exist at the time this function is called.
|
||||
* to be persisted to disk. This will replace any existing files with the same
|
||||
* name.
|
||||
*
|
||||
* @param server Server to serialize
|
||||
* @param filename Path to a file where the server is persisted
|
||||
* @return False if the serialization of the server fails, true if it was successful
|
||||
*/
|
||||
bool server_serialize(SERVER *server, const char *filename);
|
||||
bool server_serialize(SERVER *server);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
Reference in New Issue
Block a user