gateway

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: MIT Imports: 14 Imported by: 1

README

网关插件

该插件提供一下功能:

  1. 提供HTTP协议的API接口
  2. 提供控制台UI界面的框架,可以展示其他插件的UI界面
  3. 自身提供一个显示系统实时状态的界面

插件名称

GateWay

配置

目前仅有的配置是监听的端口号

[GateWay]
ListenAddr = ":8081"

使用方法

插件随实例启动而启动,打开浏览器访问配置好的端口即可,例如http://localhost:8081,根据实际情况访问

API

  • /api/sysInfo 获取系统信息,包含引擎版本和实例启动时间
  • /api/summary 获取系统实时状态,包括cpu、内存、网卡流量数据
  • /api/getConfig 获取配置文件
  • /api/getPlugins 获取所有插件信息

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginInfo

type PluginInfo struct {
	Name    string //插件名称
	Type    byte   //类型
	Config  string //插件配置
	UIDir   string //界面路径
	ReadMe  string //README.md
	Version string //插件版本
}

PluginInfo 插件信息

Jump to

Keyboard shortcuts

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