heartbeat

package
v0.26.13 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

Enable 启用心跳插件

func (*HeartbeatLifecycle) Install

Install 安装心跳插件

func (*HeartbeatLifecycle) Start

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

Stop 停止心跳插件的后台任务

func (*HeartbeatLifecycle) StopHeartbeat

func (h *HeartbeatLifecycle) StopHeartbeat()

func (*HeartbeatLifecycle) Uninstall

Uninstall 卸载心跳插件

func (*HeartbeatLifecycle) Upgrade

Upgrade 升级心跳插件

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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