api

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAPI

func InitAPI()

InitAPI register apis

Types

type API

type API struct {
	api.Handler
}

API namespace

func (API) CreateHostConfigAction

func (api API) CreateHostConfigAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) CreateProjectAction

func (api API) CreateProjectAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) CreateTaskAction

func (handler API) CreateTaskAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

curl -XPOST "http://localhost:8001/task/" -d '{ "url":"http://elasticsearch.cn", "pipeline_id":"1231231212312" }'

func (API) DeleteHostAction

func (handler API) DeleteHostAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

DeleteHostAction handle host deletion, only support delete by id, eg: curl -XDELETE http://127.0.0.1:8001/host/1

func (API) DeleteHostConfigAction

func (api API) DeleteHostConfigAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) DeleteProjectAction

func (api API) DeleteProjectAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) EnableProjectAction

func (api API) EnableProjectAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) GetHostAction

func (handler API) GetHostAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

GetHostAction return host by id, eg: curl -XGET http://127.0.0.1:8001/host/1

func (API) GetHostConfigAction

func (api API) GetHostConfigAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) GetHostConfigsAction

func (api API) GetHostConfigsAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) GetHostsAction

func (handler API) GetHostsAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

GetHostsAction return host list, support parameter: `from`, `size` and `host`, eg: curl -XGET http://127.0.0.1:8001/host?from=0&size=10

func (API) GetProjectAction

func (api API) GetProjectAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) GetProjectsAction

func (api API) GetProjectsAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) IndexAction

func (handler API) IndexAction(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

IndexAction returns cluster health information

func (API) QueueStatsAction

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

func (this API) SnapshotGetAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) SnapshotGetPayloadAction

func (this API) SnapshotGetPayloadAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) SnapshotListAction

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 `host`, eg: curl -XGET http://127.0.0.1:8001/task?from=100&size=10&host=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

func (API) TaskUpdateAction

func (api API) TaskUpdateAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) UpdateHostConfigAction

func (api API) UpdateHostConfigAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (API) UpdateProjectAction

func (api API) UpdateProjectAction(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL