Documentation
¶
Overview ¶
* * runtime 运行时脚本,需要在调用前传入全局参数 map[string][][]interface{}, * 和结果输出 map[string]interface{},以及当前计算数据位标 i * 该脚本会运行逻辑,并有一定的输出结果会写到 map[string]interface{} 中 * 支持 求和 运算, 正则:${SUM,结果变量名,计算字段 Array[0][i][price],分片字段 Array[0][i][leader]} *
* * string 脚本表示,最后直接输出字符串
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuntimeScript ¶
type RuntimeScript struct {
// contains filtered or unexported fields
}
func NewRuntimeScript ¶
func NewRuntimeScript() *RuntimeScript
func (*RuntimeScript) Call ¶
func (s *RuntimeScript) Call() (interface{}, error)
func (*RuntimeScript) Parse ¶
func (s *RuntimeScript) Parse(str string)
func (*RuntimeScript) SetCallArgs ¶
func (s *RuntimeScript) SetCallArgs(args ...interface{})
type StringScript ¶
type StringScript struct {
// contains filtered or unexported fields
}
func NewStringScript ¶
func NewStringScript() *StringScript
func (*StringScript) Call ¶
func (s *StringScript) Call() (interface{}, error)
func (*StringScript) Parse ¶
func (s *StringScript) Parse(str string)
func (*StringScript) SetCallArgs ¶
func (s *StringScript) SetCallArgs(...interface{})
Click to show internal directories.
Click to hide internal directories.