Documentation
¶
Index ¶
- Variables
- type HeartbeatLifecycle
- func (h *HeartbeatLifecycle) Disable(ctx plugins.BaseContext) error
- func (h *HeartbeatLifecycle) Enable(ctx plugins.EnableContext) error
- func (h *HeartbeatLifecycle) Install(ctx plugins.InstallContext) error
- func (h *HeartbeatLifecycle) Start(ctx plugins.BaseContext) error
- func (h *HeartbeatLifecycle) StartCron(ctx plugins.BaseContext, spec string) error
- func (h *HeartbeatLifecycle) StartHeartbeat()
- func (h *HeartbeatLifecycle) Stop(ctx plugins.BaseContext) error
- func (h *HeartbeatLifecycle) StopHeartbeat()
- func (h *HeartbeatLifecycle) Uninstall(ctx plugins.UninstallContext) error
- func (h *HeartbeatLifecycle) Upgrade(ctx plugins.UpgradeContext) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Metadata = plugins.Module{ Meta: plugins.Meta{ Name: modules.PluginNameHeartbeat, Title: "集群心跳重连插件", Version: "1.0.0", Description: "管理集群心跳检测和自动重连功能", }, Menus: []plugins.Menu{ { Key: "plugin_heartbeat_index", Title: "心跳重连管理", Icon: "fa-solid fa-heartbeat", Order: 15, Children: []plugins.Menu{ { Key: "plugin_heartbeat_config", Title: "心跳配置", Icon: "fa-solid fa-gear", Show: "isPlatformAdmin()==true", EventType: "custom", CustomEvent: `() => loadJsonPage("/plugins/heartbeat/config")`, Order: 100, }, }, }, }, Tables: []string{ "heartbeat_settings", }, Dependencies: []string{}, RunAfter: []string{ modules.PluginNameLeader, }, Lifecycle: &HeartbeatLifecycle{}, PluginAdminRouter: route.RegisterPluginAdminRoutes, }
Functions ¶
This section is empty.
Types ¶
type HeartbeatLifecycle ¶
type HeartbeatLifecycle struct {
// contains filtered or unexported fields
}
HeartbeatLifecycle 心跳插件生命周期实现
func (*HeartbeatLifecycle) Disable ¶
func (h *HeartbeatLifecycle) Disable(ctx plugins.BaseContext) error
Disable 禁用心跳插件
func (*HeartbeatLifecycle) Enable ¶
func (h *HeartbeatLifecycle) Enable(ctx plugins.EnableContext) error
Enable 启用心跳插件
func (*HeartbeatLifecycle) Install ¶
func (h *HeartbeatLifecycle) Install(ctx plugins.InstallContext) error
Install 安装心跳插件
func (*HeartbeatLifecycle) Start ¶
func (h *HeartbeatLifecycle) Start(ctx plugins.BaseContext) error
Start 启动心跳插件的后台任务
func (*HeartbeatLifecycle) StartCron ¶
func (h *HeartbeatLifecycle) StartCron(ctx plugins.BaseContext, spec string) error
StartCron 启动心跳插件的定时任务
func (*HeartbeatLifecycle) StartHeartbeat ¶
func (h *HeartbeatLifecycle) StartHeartbeat()
func (*HeartbeatLifecycle) Stop ¶
func (h *HeartbeatLifecycle) Stop(ctx plugins.BaseContext) error
Stop 停止心跳插件的后台任务
func (*HeartbeatLifecycle) StopHeartbeat ¶
func (h *HeartbeatLifecycle) StopHeartbeat()
func (*HeartbeatLifecycle) Uninstall ¶
func (h *HeartbeatLifecycle) Uninstall(ctx plugins.UninstallContext) error
Uninstall 卸载心跳插件
func (*HeartbeatLifecycle) Upgrade ¶
func (h *HeartbeatLifecycle) Upgrade(ctx plugins.UpgradeContext) error
Upgrade 升级心跳插件
Click to show internal directories.
Click to hide internal directories.