control

package
v0.0.0-...-05e86ca Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPluginExists

func CheckPluginExists(UUID string) bool

func InitPluginMap

func InitPluginMap() error

func RunPlugins

func RunPlugins()

RunPlugins 系统启动时自动运行相关插件,记录相关的错误

func StopPlugins

func StopPlugins()

Types

type TCheckPlugin

type TCheckPlugin struct {
	PluginUUID   string `json:"plugin_uuid,omitempty"`
	PluginConfig string `json:"plugin_config,omitempty"`
	RunType      string `json:"run_type,omitempty"`
}

type THeartBeat

type THeartBeat struct {
	// contains filtered or unexported fields
}

func NewHeartBeat

func NewHeartBeat() (*THeartBeat, error)

func (*THeartBeat) Start

func (hb *THeartBeat) Start()

func (*THeartBeat) Stop

func (hb *THeartBeat) Stop()

type TPluginControl

type TPluginControl struct {
	OperatorID   int32  `json:"operator_id,omitempty"`
	OperatorCode string `json:"operator_code,omitempty"`
	PageSize     int32  `json:"page_size,omitempty"`
	PageIndex    int32  `json:"page_index,omitempty"`
	module.TPlugin
	CPUUsage    string  `json:"cpu_usage"`
	MemoryUsage float64 `json:"memory_usage"`
}

func (*TPluginControl) CallPluginAPI

func (c *TPluginControl) CallPluginAPI(operate *plugins.TPluginOperate) *response.TResponse

func (*TPluginControl) DeletePlugin

func (c *TPluginControl) DeletePlugin() *response.TResponse

func (*TPluginControl) GenPluginConfig

func (c *TPluginControl) GenPluginConfig() (string, error)

func (*TPluginControl) GetLoadedPlugins

func (c *TPluginControl) GetLoadedPlugins() *response.TResponse

func (*TPluginControl) GetPluginTmpCfg

func (c *TPluginControl) GetPluginTmpCfg() *response.TResponse

func (*TPluginControl) GetPlugins

func (c *TPluginControl) GetPlugins() *response.TResponse

func (*TPluginControl) GetProductKey

func (c *TPluginControl) GetProductKey() *response.TResponse

GetProductKey 获取并验证产品序列号和授权码

func (*TPluginControl) InsertPlugin

func (c *TPluginControl) InsertPlugin()

func (*TPluginControl) RunPlugin

func (c *TPluginControl) RunPlugin() *response.TResponse

func (*TPluginControl) StopPlugin

func (c *TPluginControl) StopPlugin() *response.TResponse

func (*TPluginControl) UpdatePlugFileName

func (c *TPluginControl) UpdatePlugFileName() *response.TResponse

UpdatePlugFileName 更新插件文件名称

type TPluginRequester

type TPluginRequester struct {
	SerialNumber string
	PluginFile   string
	Client       *plugin.Client
	ImpPlugin    plugins.IPlugin
	PluginConfig string
}

func IndexPlugin

func IndexPlugin(UUID, pluginFile string) (*TPluginRequester, error)

func NewPlugin

func NewPlugin(serialNumber, pluginFile string) (*TPluginRequester, error)

func (*TPluginRequester) Close

func (pr *TPluginRequester) Close()

func (*TPluginRequester) Running

func (pr *TPluginRequester) Running() bool

Jump to

Keyboard shortcuts

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