Documentation ¶
Index ¶
- func InfoHandler(c *gin.Context)
- func ReverseProxyHandler(c *gin.Context)
- type Client
- func (c *Client) ApplyConfig(batch *common.Batch, path, content string) error
- func (c *Client) GetPluginInfo(name string) (*PluginInfo, error)
- func (c *Client) ListenEvent(event Event, callback EventCallback) error
- func (c *Client) MachineList() ([]*common.MachineNode, error)
- func (c *Client) RegisterHandlers(router *gin.Engine)
- func (c *Client) RunCommand(batch *common.Batch, cmd string) ([]*CmdResult, error)
- func (c *Client) RunScript(batch *common.Batch, script string, params []string) ([]*CmdResult, error)
- func (c *Client) ServiceStatus(batch *common.Batch, servicename string) ([]*common.ServiceResult, error)
- func (c *Client) StartService(batch *common.Batch, serviceName string) ([]*common.ServiceResult, error)
- func (c *Client) StopService(batch *common.Batch, serviceName string) ([]*common.ServiceResult, error)
- func (c *Client) UnListenEvent(listenerID string) error
- type CmdResult
- type CmdStruct
- type Event
- type EventCallback
- type PluginInfo
- type ScriptStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InfoHandler ¶
func ReverseProxyHandler ¶
Types ¶
type Client ¶
type Client struct { Server string PluginInfo *PluginInfo }
func DefaultClient ¶
func DefaultClient(desc *PluginInfo) *Client
func (*Client) ApplyConfig ¶
func (*Client) GetPluginInfo ¶
func (c *Client) GetPluginInfo(name string) (*PluginInfo, error)
func (*Client) ListenEvent ¶
func (c *Client) ListenEvent(event Event, callback EventCallback) error
注册event事件监听
func (*Client) MachineList ¶
func (c *Client) MachineList() ([]*common.MachineNode, error)
func (*Client) RegisterHandlers ¶
RegisterHandlers 注册一些插件标准的API接口,清单如下: GET /plugin_manage/info
func (*Client) RunCommand ¶
func (*Client) ServiceStatus ¶
func (*Client) StartService ¶
func (*Client) StopService ¶
func (*Client) UnListenEvent ¶
取消注册event事件监听
type EventCallback ¶
type EventCallback func(e *Event)
type PluginInfo ¶
type PluginInfo struct { Name string `json:"name"` Version string `json:"version"` Description string `json:"description"` Author string `json:"author"` Email string `json:"email"` Url string `json:"url"` PluginType string `json:"plugin_type"` ReverseDest string `json:"reverse_dest"` }
var BaseInfo *PluginInfo
Click to show internal directories.
Click to hide internal directories.