2021-02-12 02:16:37 +01:00
|
|
|
package api
|
|
|
|
|
2021-02-12 03:04:53 +01:00
|
|
|
// Index is used to sync the backend storage with
|
|
|
|
// the database meta information
|
|
|
|
//
|
2021-02-12 02:16:37 +01:00
|
|
|
// POST /api/v1/index
|
|
|
|
func (v1 *V1Client) Index() error {
|
|
|
|
resp := v1.POST(nil, "/api/v1/index")
|
|
|
|
return resp.Error
|
|
|
|
}
|
|
|
|
|
2021-02-12 03:04:53 +01:00
|
|
|
// CancelIndex can be used to attempt to cancel a running index
|
|
|
|
// operation
|
|
|
|
//
|
2021-02-12 02:16:37 +01:00
|
|
|
// DELETE /api/v1/index
|
|
|
|
func (v1 *V1Client) CancelIndex() error {
|
|
|
|
resp := v1.DELETE(nil, "/api/v1/index")
|
|
|
|
return resp.Error
|
|
|
|
}
|