Documentation
¶
Index ¶
- func InitAPI()
- type API
- func (handler API) DomainAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (handler API) DomainDeleteAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (handler API) DomainGetAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (handler API) IndexAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
- func (handler API) QueueStatsAction(w http.ResponseWriter, req *http.Request)
- func (this API) SnapshotAction(w http.ResponseWriter, req *http.Request)
- func (this API) SnapshotGetAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (this API) SnapshotGetPayloadAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (this API) SnapshotListAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (handler API) StatsAction(w http.ResponseWriter, req *http.Request)
- func (handler API) TaskAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (handler API) TaskDeleteAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (handler API) TaskGetAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
api.Handler
}
API namespace
func (API) DomainAction ¶
func (handler API) DomainAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
DomainAction return domain list, support parameter: `from`, `size` and `domain`, eg: curl -XGET http://127.0.0.1:8001/domain?from=0&size=10
func (API) DomainDeleteAction ¶
func (handler API) DomainDeleteAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
DomainDeleteAction handle domain deletion, only support delete by id, eg: curl -XDELETE http://127.0.0.1:8001/domain/1
func (API) DomainGetAction ¶
func (handler API) DomainGetAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
DomainGetAction return domain by domain id, eg: curl -XGET http://127.0.0.1:8001/domain/1
func (API) IndexAction ¶
func (handler API) IndexAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)
IndexAction returns cluster health information
func (API) QueueStatsAction ¶ added in v0.9.0
func (handler API) QueueStatsAction(w http.ResponseWriter, req *http.Request)
QueueStatsAction return queue stats information
func (API) SnapshotAction ¶
func (this API) SnapshotAction(w http.ResponseWriter, req *http.Request)
func (API) SnapshotGetAction ¶ added in v0.9.0
func (this API) SnapshotGetAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
func (API) SnapshotGetPayloadAction ¶ added in v0.9.0
func (this API) SnapshotGetPayloadAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
func (API) SnapshotListAction ¶ added in v0.9.0
func (this API) SnapshotListAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
func (API) StatsAction ¶
func (handler API) StatsAction(w http.ResponseWriter, req *http.Request)
StatsAction return stats information
func (API) TaskAction ¶
func (handler API) TaskAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
TaskAction handle task creation and return task list which support parameter: `from`, `size` and `domain`, eg: curl -XPOST "http://localhost:8001/task/" -d '{ "seed":"http://elasticsearch.cn" }' curl -XGET http://127.0.0.1:8001/task?from=100&size=10&domain=elasticsearch.cn
func (API) TaskDeleteAction ¶
func (handler API) TaskDeleteAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
TaskDeleteAction handle task delete by id, eg: curl -XDELETE http://127.0.0.1:8001/task/1
func (API) TaskGetAction ¶
func (handler API) TaskGetAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
TaskGetAction return task model by task_id, eg: curl -XGET http://127.0.0.1:8001/task/1