Documentation
¶
Overview ¶
Package executor provides semantic action execution with registry-based service discovery. This is the core executor for all EVE-based semantic actions.
Index ¶
- func ExportAsJSONLD(action *semantic.SemanticScheduledAction) ([]byte, error)
- func IntrospectAction(action *semantic.SemanticScheduledAction) map[string]interface{}
- func QueryActionsByType(actions []*semantic.SemanticScheduledAction, actionType string) []*semantic.SemanticScheduledAction
- func QueryActionsByURL(actions []*semantic.SemanticScheduledAction, urlPattern string) []*semantic.SemanticScheduledAction
- func ResolveRegistryURL(registryURL string) (string, error)
- type CommandExecutor
- type Executor
- type Registry
- type ScheduledActionExecutor
- type Service
- type URLBasedExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportAsJSONLD ¶
func ExportAsJSONLD(action *semantic.SemanticScheduledAction) ([]byte, error)
ExportAsJSONLD exports an action as JSON-LD
func IntrospectAction ¶
func IntrospectAction(action *semantic.SemanticScheduledAction) map[string]interface{}
IntrospectAction analyzes what an action will do (semantic introspection)
func QueryActionsByType ¶
func QueryActionsByType(actions []*semantic.SemanticScheduledAction, actionType string) []*semantic.SemanticScheduledAction
QueryActionsByType returns all actions of a specific semantic type
func QueryActionsByURL ¶
func QueryActionsByURL(actions []*semantic.SemanticScheduledAction, urlPattern string) []*semantic.SemanticScheduledAction
QueryActionsByURL returns all actions that interact with a specific URL
func ResolveRegistryURL ¶
ResolveRegistryURL resolves registry://servicename/path to http://host:port/path Example: registry://infisicalservice/v1/api/semantic/action -> http://localhost:8093/v1/api/semantic/action Cache can be disabled for development via REGISTRY_CACHE_ENABLED=false
Types ¶
type CommandExecutor ¶
type CommandExecutor struct{}
CommandExecutor executes actions with command property (backward compatibility)
func (*CommandExecutor) CanHandle ¶
func (e *CommandExecutor) CanHandle(action *semantic.SemanticScheduledAction) bool
func (*CommandExecutor) Execute ¶
func (e *CommandExecutor) Execute(action *semantic.SemanticScheduledAction) (string, error)
type Executor ¶
type Executor interface {
// Execute runs a semantic action and returns output, error
Execute(action *semantic.SemanticScheduledAction) (string, error)
// CanHandle returns true if this executor can handle the given action
CanHandle(action *semantic.SemanticScheduledAction) bool
}
Executor defines the interface for semantic action executors
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages semantic executors with priority-based dispatch
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry creates a new executor registry with default executors
type ScheduledActionExecutor ¶
type ScheduledActionExecutor struct {
FetcherPath string
Registry *Registry // Reference to registry for delegating embedded actions
}
ScheduledActionExecutor handles ScheduledAction wrapper type and HTTP-property actions This executor is for backward compatibility with non-semantic action definitions.
func (*ScheduledActionExecutor) CanHandle ¶
func (e *ScheduledActionExecutor) CanHandle(action *semantic.SemanticScheduledAction) bool
func (*ScheduledActionExecutor) Execute ¶
func (e *ScheduledActionExecutor) Execute(action *semantic.SemanticScheduledAction) (string, error)
type Service ¶
type Service struct {
Identifier string `json:"identifier"`
Name string `json:"name"`
URL string `json:"url"`
Properties map[string]interface{} `json:"additionalProperty"`
}
Service represents a registered service from the registry API
func FindServicesByCapability ¶ added in v0.0.30
FindServicesByCapability queries the registry for services with a specific capability
type URLBasedExecutor ¶
type URLBasedExecutor struct{}
URLBasedExecutor routes actions to any service with /v1/api/semantic/action endpoint This is the universal executor for all semantic service endpoints.
func (*URLBasedExecutor) CanHandle ¶
func (e *URLBasedExecutor) CanHandle(action *semantic.SemanticScheduledAction) bool
func (*URLBasedExecutor) Execute ¶
func (e *URLBasedExecutor) Execute(action *semantic.SemanticScheduledAction) (string, error)