agent

package
v0.0.0-...-0deb007 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	common.BaseService
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(cfg *common.Config) (*Agent, error)

func (*Agent) Alive

func (svc *Agent) Alive(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Agent) CancelTask

func (svc *Agent) CancelTask(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

CancelTask DELETE /api/v1/agent/tasks/:id

func (*Agent) ChangeIp

func (svc *Agent) ChangeIp(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

为了保证本地获取和客户端配置ip的一致性 GET /api/v1/agent/ip/:ip

func (*Agent) CreateTask

func (svc *Agent) CreateTask(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

------------------------------------------ POST /api/v1/agent/tasks

func (*Agent) OnStart

func (c *Agent) OnStart(cfg *common.Config, e *httprouter.Router) error

func (*Agent) OnStop

func (c *Agent) OnStop(cfg *common.Config, e *httprouter.Router)

func (*Agent) StartTask

func (svc *Agent) StartTask(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

StartTask POST /api/v1/agent/tasks/start

Jump to

Keyboard shortcuts

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