Documentation ¶
Index ¶
- Constants
- func GetActionFunction(id string) model.ActionFunction
- func GetActionFunctionID(actionFn model.ActionFunction) string
- func GetConditionEvaluator(id string) model.ConditionEvaluator
- func GetConditionEvaluatorID(conditionEvaluator model.ConditionEvaluator) string
- 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 ConditionDescriptor
- type DefinitionConfig
- type ResourceManager
- func (m *ResourceManager) GetResource(id string) interface{}
- func (m *ResourceManager) GetRuleActionDescriptor(uri string) (*RuleActionDescriptor, error)
- func (m *ResourceManager) GetRuleSessionDescriptor(uri string) (*RuleSessionDescriptor, error)
- func (m *ResourceManager) LoadResource(resConfig *resource.Config) (*resource.Resource, error)
- type RuleActionDescriptor
- type RuleDescriptor
- type RuleSessionDescriptor
Constants ¶
View Source
const (
RESTYPE_RULESESSION = "rulesession"
)
Variables ¶
This section is empty.
Functions ¶
func GetActionFunction ¶
func GetActionFunction(id string) model.ActionFunction
GetActionFunction gets specified ActionFunction
func GetActionFunctionID ¶ added in v0.1.1
func GetActionFunctionID(actionFn model.ActionFunction) string
GetActionFunctionID get ActionFunction id based on the function reference
func GetConditionEvaluator ¶
func GetConditionEvaluator(id string) model.ConditionEvaluator
GetConditionEvaluator gets specified ConditionEvaluator
func GetConditionEvaluatorID ¶ added in v0.1.1
func GetConditionEvaluatorID(conditionEvaluator model.ConditionEvaluator) string
GetConditionEvaluatorID gets ConditionEvaluator Id based on the function reference
func GetStartupRSFunction ¶
func GetStartupRSFunction(rsName string) (startupFn model.StartupRSFunction)
GetStartupRSFunction gets registered StartupRSFunction
func RegisterActionFunction ¶
func RegisterActionFunction(id string, actionFunction model.ActionFunction) error
RegisterActionFunction registers the specified ActionFunction
func RegisterConditionEvaluator ¶
func RegisterConditionEvaluator(id string, conditionEvaluator model.ConditionEvaluator) error
RegisterConditionEvaluator registers the specified ConditionEvaluator
func RegisterStartupRSFunction ¶
func RegisterStartupRSFunction(rsName string, startupFn model.StartupRSFunction) error
RegisterStartupRSFunction registers the specified StartupRSFunction
Types ¶
type ConditionDescriptor ¶ added in v0.1.1
type ConditionDescriptor struct { Name string Identifiers []string Evaluator model.ConditionEvaluator }
ConditionDescriptor defines a condition in a rule
func (*ConditionDescriptor) MarshalJSON ¶ added in v0.1.1
func (c *ConditionDescriptor) MarshalJSON() ([]byte, error)
func (*ConditionDescriptor) UnmarshalJSON ¶ added in v0.1.1
func (c *ConditionDescriptor) UnmarshalJSON(d []byte) error
type DefinitionConfig ¶ added in v0.1.1
type DefinitionConfig struct { Name string `json:"name"` Metadata *metadata.IOMetadata `json:"metadata"` Rules []*RuleDescriptor `json:"rules"` }
metadata support
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) GetRuleActionDescriptor ¶ added in v0.1.1
func (m *ResourceManager) GetRuleActionDescriptor(uri string) (*RuleActionDescriptor, error)
func (*ResourceManager) GetRuleSessionDescriptor ¶ added in v0.1.1
func (m *ResourceManager) GetRuleSessionDescriptor(uri string) (*RuleSessionDescriptor, error)
func (*ResourceManager) LoadResource ¶
type RuleActionDescriptor ¶ added in v0.1.1
type RuleActionDescriptor struct { Name string `json:"name"` IOMetadata *metadata.IOMetadata `json:"metadata"` Rules []*RuleDescriptor `json:"rules"` }
type RuleDescriptor ¶ added in v0.1.1
type RuleDescriptor struct { Name string Conditions []*ConditionDescriptor ActionFunc model.ActionFunction Priority int }
RuleDescriptor defines a rule
func (*RuleDescriptor) MarshalJSON ¶ added in v0.1.1
func (c *RuleDescriptor) MarshalJSON() ([]byte, error)
func (*RuleDescriptor) UnmarshalJSON ¶ added in v0.1.1
func (c *RuleDescriptor) UnmarshalJSON(d []byte) error
type RuleSessionDescriptor ¶ added in v0.1.1
type RuleSessionDescriptor struct {
Rules []*RuleDescriptor `json:"rules"`
}
Click to show internal directories.
Click to hide internal directories.