callback

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config added in v1.0.8

func Config(action, paramName, loc string, paramValue any) error

Config 网元配置消息处理 action 操作行为 Create(创建)、Update(更新)、Read(读取)、Delete(删除) paramName 参数名称 loc 定位符 list为空字符 array使用与数据对象内index一致,有多层时划分嵌套层(index/subParamName/index) paramValue 参数值

func Handler

func Handler(callback CallbackHandler)

Handler 回调实现

func Redis

func Redis() (*redis.Client, error)

Redis 实例 *redis.Client

func SNMP

func SNMP(oid, operType string, value any) any

SNMP 消息处理

func Standby

func Standby() bool

Standby 备用状态

func Telent

func Telent(command string) string

Telent 消息处理

Types

type CallbackHandler

type CallbackHandler interface {
	// 备用状态
	Standby() bool
	// Redis 实例 *redis.Client
	Redis() any
	// Telent 消息处理
	Telent(command string) string
	// SNMP 消息处理
	SNMP(oid, operType string, value any) any
	// Config 网元配置消息处理
	// action  操作行为 C/U/R/D Create(创建)、Update(更新)、Read(读取)、Delete(删除)
	// paramName 参数名称
	// loc 定位符 list为空字符 array使用与数据对象内index一致,有多层时划分嵌套层(index/subParamName/index)
	// paramValue 参数值
	Config(action, paramName, loc string, paramValue any) error
}

外部回调接口

Jump to

Keyboard shortcuts

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