Documentation
¶
Overview ¶
Package inprocess creates and configures the in-process workflow executor used for dapr-internal workflows (e.g. MCP tool calls). The executor runs alongside the sidecar rather than dispatching work to an external SDK via gRPC. Subsystems register their orchestrators and activities after resources are loaded (e.g. MCPServers) to ensure the store is populated.
Index ¶
- type Executor
- func (e *Executor) Backend() backend.Executor
- func (e *Executor) RegisterMCPServer(ctx context.Context, server mcpserverapi.MCPServer, ...) error
- func (e *Executor) Run(ctx context.Context) error
- func (e *Executor) SetOnMCPTeardown(fn func(name string))
- func (e *Executor) UnregisterMCPServer(serverName string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor wraps a task.TaskExecutor and exposes per-subsystem registrars for in-process workflows that run inside the sidecar. Subsystems (MCP today, others later) live in their own files; the Executor is a thin shell that holds the shared task registry and delegates to each subsystem registrar.
func NewExecutor ¶
func NewExecutor() *Executor
NewExecutor creates an in-process executor with an empty registry. Workflows are registered per-resource via subsystem-specific methods (e.g. RegisterMCPServer).
func (*Executor) Backend ¶
Backend returns the underlying backend.Executor for use by the workflow engine.
func (*Executor) RegisterMCPServer ¶
func (e *Executor) RegisterMCPServer(ctx context.Context, server mcpserverapi.MCPServer, store *compstore.ComponentStore, sec security.Handler) error
RegisterMCPServer eagerly connects to the MCPServer, discovers its tools, and installs per-tool CallTool workflows plus a ListTools workflow into the shared task registry. Called by the processor on initial load and hot-reload.
func (*Executor) SetOnMCPTeardown ¶
SetOnMCPTeardown registers a callback invoked once per MCPServer entry that is torn down during Run's shutdown path. The callback receives the server name and runs synchronously inside closeAll, after the holder has been closed. Used by the workflow engine to keep its actor refcount balanced when shutdown bypasses the normal UnregisterMCPServer path.
func (*Executor) UnregisterMCPServer ¶
UnregisterMCPServer removes the workflows for a deleted MCPServer. Returns true iff the entry was actually registered (so callers can balance their own refcount without over-decrementing for a server whose registration failed or was already torn down).