netdiscover

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

README

设备网络发现插件

该插件本意被设计用来做设备互相发现用,但是目前暂时还未进行开发工作。

获取节点信息

该插件支持监听局域网扫描,只需向节点指定的 UDP 端口(默认1994)发送"NODE_INFO"即可扫描到节点的信息。

{
    "allocMem":14,
    "cpuPercent":0,
    "diskInfo":69,
    "osArch":"windows-amd64",
    "startedTime":"2023-04-13 22:42:34",
    "systemMem":30,
    "totalMem":16,
    "version":{
        "Version":"v0.4.4",
        "ReleaseTime":"2023-04-13 21:44:33"
    }
}

节点发现配置

[plugin.netdiscover]
#
# Enable
#
enable = false
#
# Server host, default allow all
#
listen_host = 0.0.0.0
#
# Server port
#
listen_port = 1994

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetDiscover

func NewNetDiscover() typex.XPlugin

Types

type NetDiscover

type NetDiscover struct {
	Neighbors map[string]gwnode // 邻居
	// contains filtered or unexported fields
}

func (*NetDiscover) Init

func (dm *NetDiscover) Init(config *ini.Section) error

func (*NetDiscover) PluginMetaInfo

func (hh *NetDiscover) PluginMetaInfo() typex.XPluginMetaInfo

func (*NetDiscover) Service

func (cs *NetDiscover) Service(arg typex.ServiceArg) typex.ServiceResult

* * 服务调用接口 *

func (*NetDiscover) Start

func (dm *NetDiscover) Start(typex.RuleX) error

func (*NetDiscover) Stop

func (dm *NetDiscover) Stop() error

Jump to

Keyboard shortcuts

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