Documentation
¶
Overview ¶
Package mgmthttp implements the Raft management HTTP API public interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBackup ¶
func CreateBackup(api MgmtApi, w http.ResponseWriter, r *http.Request)
CreateBackup creates a backup of the RocksDB data up to now: The http post url is:
POST /backup
The following statuses are expected: If everything is alright, the HTTP status is 200 with an empty body.
func DeleteBackup ¶
func DeleteBackup(api MgmtApi, w http.ResponseWriter, r *http.Request)
DeleteBackup deletes a certain backup (given its ID) from the system: The http post url is:
DELETE /backup?backupID=<id>
The following statuses are expected: If everything is alright, the HTTP status is 204 with an empty body.
func ListBackups ¶
func ListBackups(api MgmtApi) http.HandlerFunc
ListBackups returns a list of backups along with each backup information. The http post url is:
GET /backups
The following statuses are expected: If everything is alright, the HTTP status is 204 and the body contains: [
{
"ID": 1,
"Timestamp": 1523653256854,
"Size": 16786",
"NumFiles": 4,
"Metadata": "foo"
},
{
"ID": 2,
"Timestamp": 1523653256999,
"Size": 21786,
"NumFiles": 4,
"Metadata": "bar"
},
...
]
func ManageBackup ¶
func ManageBackup(api MgmtApi) http.HandlerFunc
func NewMgmtHttp ¶
NewMgmtHttp will return a mux server with endpoints to manage different QED log service features: DDBB backups, Raft membership,...
/backup -> Create or Delete a backup /backups -> List backups