Documentation ¶
Index ¶
- Constants
- func GetActionFunction(id string) model.ActionFunction
- func GetConditionEvaluator(id string) model.ConditionEvaluator
- func GetOrCreateRuleSessionFromConfig(name string, config *RuleSession) (model.RuleSession, error)
- func GetStartupRSFunction(rsName string) (startupFn model.StartupRSFunction)
- func RegisterActionFunction(id string, actionFunction model.ActionFunction) error
- func RegisterConditionEvaluator(id string, conditionEvaluator model.ConditionEvaluator) error
- func RegisterStartupRSFunction(rsName string, startupFn model.StartupRSFunction) error
- type Condition
- type ResourceManager
- type Rule
- type RuleSession
Constants ¶
View Source
const (
RESTYPE_RULESESSION = "rulesession"
)
Variables ¶
This section is empty.
Functions ¶
func GetActionFunction ¶
func GetActionFunction(id string) model.ActionFunction
Get gets specified ActionFunction
func GetConditionEvaluator ¶
func GetConditionEvaluator(id string) model.ConditionEvaluator
Get gets specified ConditionEvaluator
func GetOrCreateRuleSessionFromConfig ¶
func GetOrCreateRuleSessionFromConfig(name string, config *RuleSession) (model.RuleSession, error)
todo this should probably move to ruleapi
func GetStartupRSFunction ¶
func GetStartupRSFunction(rsName string) (startupFn model.StartupRSFunction)
func RegisterActionFunction ¶
func RegisterActionFunction(id string, actionFunction model.ActionFunction) error
Register registers the specified ActionFunction
func RegisterConditionEvaluator ¶
func RegisterConditionEvaluator(id string, conditionEvaluator model.ConditionEvaluator) error
Register registers the specified ConditionEvaluator
func RegisterStartupRSFunction ¶
func RegisterStartupRSFunction(rsName string, startupFn model.StartupRSFunction) error
Register registers the specified StartupRSFunction
Types ¶
type Condition ¶
type Condition struct { Name string Identifiers []string Evaluator model.ConditionEvaluator }
func (*Condition) UnmarshalJSON ¶
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
func NewResourceManager ¶
func NewResourceManager() *ResourceManager
func (*ResourceManager) GetResource ¶
func (m *ResourceManager) GetResource(id string) interface{}
func (*ResourceManager) GetRuleSessionConfig ¶
func (m *ResourceManager) GetRuleSessionConfig(uri string) (*RuleSession, error)
func (*ResourceManager) LoadResource ¶
func (m *ResourceManager) LoadResource(resConfig *resource.Config) error
type Rule ¶
type Rule struct { Name string Conditions []*Condition ActionFunc model.ActionFunction Priority int }
func (*Rule) UnmarshalJSON ¶
type RuleSession ¶
type RuleSession struct {
Rules []*Rule `json:"rules"`
}
Click to show internal directories.
Click to hide internal directories.