Documentation
¶
Index ¶
- Constants
- Variables
- func ExecuteActions(rule *typex.Rule, arg lua.LValue) (lua.LValue, error)
- func ExecuteExpression(rule *typex.Rule, env map[string]interface{}) (interface{}, error)
- func ExecuteFailed(vm *lua.LState, arg lua.LValue) (interface{}, error)
- func ExecuteSuccess(vm *lua.LState) (interface{}, error)
- func InitGlobalConfig(path string) typex.RulexConfig
- func NewDeviceTypeManager() typex.DeviceRegistry
- func NewRulexStore(maxSize int) typex.XStore
- func NewSourceTypeManager() typex.SourceRegistry
- func NewTargetTypeManager() typex.TargetRegistry
- func SetDebugMode(EnablePProf bool)
- func SetGomaxProcs(GomaxProcs int)
- func StartStore(maxSize int)
- func VerifyExprSyntax(r *typex.Rule) error
- func VerifyLuaSyntax(r *typex.Rule) error
- type DeviceTypeManager
- type RulexStore
- type SourceTypeManager
- type TargetTypeManager
Constants ¶
View Source
const ( SUCCESS_KEY string = "Success" FAILED_KEY string = "Failed" ACTIONS_KEY string = "Actions" )
Variables ¶
View Source
var GlobalConfig typex.RulexConfig
View Source
var GlobalStore typex.XStore
View Source
var INIPath string
Functions ¶
func ExecuteActions ¶
* * Execute Lua Callback *
func ExecuteExpression ¶
* * Execute Expression * https://expr.medv.io/docs/Getting-Started *
func ExecuteSuccess ¶
LUA Callback : Success
func NewDeviceTypeManager ¶
func NewDeviceTypeManager() typex.DeviceRegistry
func NewRulexStore ¶
func NewSourceTypeManager ¶
func NewSourceTypeManager() typex.SourceRegistry
func NewTargetTypeManager ¶
func NewTargetTypeManager() typex.TargetRegistry
func StartStore ¶
func StartStore(maxSize int)
Types ¶
type DeviceTypeManager ¶
type DeviceTypeManager struct {
// contains filtered or unexported fields
}
func (*DeviceTypeManager) All ¶
func (rm *DeviceTypeManager) All() []*typex.XConfig
func (*DeviceTypeManager) Find ¶
func (rm *DeviceTypeManager) Find(name typex.DeviceType) *typex.XConfig
func (*DeviceTypeManager) Register ¶
func (rm *DeviceTypeManager) Register(name typex.DeviceType, f *typex.XConfig)
type RulexStore ¶
type RulexStore struct {
// contains filtered or unexported fields
}
func (*RulexStore) Delete ¶
func (rs *RulexStore) Delete(k string) error
func (*RulexStore) FuzzyGet ¶
func (rs *RulexStore) FuzzyGet(k string) string
模糊查询匹配 支持: *AAA AAA* A*B
func (*RulexStore) SetDuration ¶
func (rs *RulexStore) SetDuration(k string, v string, d time.Duration)
* * 设置过期时间 *
type SourceTypeManager ¶
type SourceTypeManager struct {
// contains filtered or unexported fields
}
func (*SourceTypeManager) All ¶
func (rm *SourceTypeManager) All() []*typex.XConfig
type TargetTypeManager ¶
type TargetTypeManager struct {
// contains filtered or unexported fields
}
func (*TargetTypeManager) All ¶
func (rm *TargetTypeManager) All() []*typex.XConfig
func (*TargetTypeManager) Find ¶
func (rm *TargetTypeManager) Find(name typex.TargetType) *typex.XConfig
func (*TargetTypeManager) Register ¶
func (rm *TargetTypeManager) Register(name typex.TargetType, f *typex.XConfig)
Click to show internal directories.
Click to hide internal directories.