Documentation ¶
Index ¶
- Constants
- func GetOuterBracketContent(value string) (string, string, error)
- func RegisterAssemblyBean(bean interface{}) error
- func RegisterChain(name string, assembly Assembly) error
- func RegisterInterceptor(bean HandleInterceptor) error
- func SortHandleInterceptor(people []HandleInterceptor, by func(p, q HandleInterceptor) bool)
- func SplitOuterComma(value string) []string
- type Assembly
- type BaseConditionHandle
- type BaseHandle
- type ChainConfig
- type ChainExpression
- type ChainList
- type ConfigHandle
- type ExecuteAssembly
- type HandleInterceptor
- type HelpHandle
- type InterceptorWrapper
- type JoinPoint
- type NodeExpression
- type NodeType
- type SWITCHAssembly
- type StreamConfig
- type ThenAssembly
- type WHENAssembly
Constants ¶
View Source
const ( THEN string = "THEN" WHEN string = "WHEN" SWITCH string = "SWITCH" EXECUTE string = "EXECUTE" )
Variables ¶
This section is empty.
Functions ¶
func RegisterAssemblyBean ¶
func RegisterAssemblyBean(bean interface{}) error
func RegisterChain ¶
func RegisterInterceptor ¶
func RegisterInterceptor(bean HandleInterceptor) error
func SortHandleInterceptor ¶
func SortHandleInterceptor(people []HandleInterceptor, by func(p, q HandleInterceptor) bool)
func SplitOuterComma ¶
Types ¶
type Assembly ¶
type Assembly interface {
Execute(Context model.ContextHandle) error
}
type BaseConditionHandle ¶
type BaseConditionHandle interface { AssemblyName() string ProcessSwitch(context model.ContextHandle) string }
func GetConditionAssemblyBean ¶
func GetConditionAssemblyBean(name string) BaseConditionHandle
type BaseHandle ¶
type BaseHandle interface { AssemblyName() string DoHandle(context model.ContextHandle) error }
func GetBaseAssemblyBean ¶
func GetBaseAssemblyBean(name string) BaseHandle
type ChainConfig ¶
type ChainExpression ¶
type ChainExpression struct { Name string IsContinueOnError bool NodeExpression *NodeExpression }
func (*ChainExpression) ParseAssembly ¶
func (sf *ChainExpression) ParseAssembly() (Assembly, error)
type ChainList ¶
type ChainList struct {
ChainList []*ChainExpression
}
type ConfigHandle ¶
type ConfigHandle interface {
IsContinueOnError(context model.ContextHandle) bool
}
type ExecuteAssembly ¶
type ExecuteAssembly struct { Handle BaseHandle IsContinueOnError bool }
func (*ExecuteAssembly) Execute ¶
func (sf *ExecuteAssembly) Execute(Context model.ContextHandle) error
type HandleInterceptor ¶
type HandleInterceptor interface { Pointcut() string Sort() int Around(context model.ContextHandle, joinPoint *JoinPoint) error }
func GetMatchInterceptor ¶
func GetMatchInterceptor(handle BaseHandle) []HandleInterceptor
type HelpHandle ¶
type HelpHandle interface { IsAccess(context model.ContextHandle) bool OnSuccess(context model.ContextHandle) OnError(context model.ContextHandle, err error) }
type InterceptorWrapper ¶
type InterceptorWrapper struct {
// contains filtered or unexported fields
}
func (InterceptorWrapper) Len ¶
func (pw InterceptorWrapper) Len() int
func (InterceptorWrapper) Less ¶
func (pw InterceptorWrapper) Less(i, j int) bool
func (InterceptorWrapper) Swap ¶
func (pw InterceptorWrapper) Swap(i, j int)
type JoinPoint ¶
type JoinPoint struct {
// contains filtered or unexported fields
}
func NewJoinPoint ¶
func NewJoinPoint(executeAssembly *ExecuteAssembly, handleInterceptor []HandleInterceptor) *JoinPoint
type NodeExpression ¶
type NodeExpression struct { //节点类型 NodeType string //SubNode不为空,说明是条件节点,NodeName除了swich一定是空 SubNode []*NodeExpression //NodeName不为空说明是执行节点,SubNode除了swich一定是空 NodeName string }
func ParseChainRule2 ¶
func ParseChainRule2(value string) (*NodeExpression, error)
type SWITCHAssembly ¶
type SWITCHAssembly struct { ConditionHandle BaseConditionHandle SelectAssemblys map[string]*Assembly }
func (*SWITCHAssembly) Execute ¶
func (sf *SWITCHAssembly) Execute(Context model.ContextHandle) error
type StreamConfig ¶
type StreamConfig struct {
ChainConfigs []ChainConfig `xml:"chain" yaml:"chain"`
}
func AnalysePath ¶
func AnalysePath(path string) (*StreamConfig, error)
func (*StreamConfig) Parse ¶
func (sf *StreamConfig) Parse() ([]*ChainExpression, error)
type ThenAssembly ¶
type ThenAssembly struct {
Assemblys []Assembly
}
func (*ThenAssembly) Execute ¶
func (sf *ThenAssembly) Execute(Context model.ContextHandle) error
type WHENAssembly ¶
type WHENAssembly struct {
Assemblys []Assembly
}
func (*WHENAssembly) Execute ¶
func (sf *WHENAssembly) Execute(context model.ContextHandle) error
Click to show internal directories.
Click to hide internal directories.