http

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: Apache-2.0 Imports: 16 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 added in v0.10.0

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

func (API) CreateProjectAction added in v0.10.0

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

func (API) CreateTaskAction added in v0.10.0

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 added in v0.10.0

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 added in v0.10.0

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

func (API) DeleteProjectAction added in v0.10.0

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

func (API) GetHostAction added in v0.10.0

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 added in v0.10.0

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

func (API) GetHostConfigsAction added in v0.10.0

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

func (API) GetHostsAction added in v0.10.0

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 added in v0.10.0

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

func (API) GetProjectsAction added in v0.10.0

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 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 `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 added in v0.10.0

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

func (API) UpdateHostConfigAction added in v0.10.0

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

func (API) UpdateProjectAction added in v0.10.0

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