Documentation
¶
Overview ¶
Package worker provides background worker functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceRegistrationWorker ¶
type ServiceRegistrationWorker struct {
// contains filtered or unexported fields
}
ServiceRegistrationWorker is a background worker responsible for handling service registration requests. It listens for ServiceRegistrationRequest messages on the event bus, processes them using the service registry, and publishes the results as ServiceRegistrationResult messages.
func NewServiceRegistrationWorker ¶
func NewServiceRegistrationWorker(bus *bus.Provider, serviceRegistry serviceregistry.ServiceRegistryInterface) *ServiceRegistrationWorker
NewServiceRegistrationWorker creates a new ServiceRegistrationWorker.
bus is the event bus used for receiving requests and publishing results. serviceRegistry is the registry that will handle the actual registration logic.
func (*ServiceRegistrationWorker) Start ¶
func (w *ServiceRegistrationWorker) Start(ctx context.Context)
Start launches the worker in a new goroutine. It subscribes to service registration requests on the event bus and will continue to process them until the provided context is canceled.
ctx is the context that controls the lifecycle of the worker.
type UpstreamWorker ¶
type UpstreamWorker struct {
// contains filtered or unexported fields
}
UpstreamWorker is a background worker that handles tool execution requests. It listens for ToolExecutionRequest messages on the event bus, uses the tool manager to execute the requested tool, and then publishes the outcome as a ToolExecutionResult message.
func NewUpstreamWorker ¶
func NewUpstreamWorker(bus *bus.Provider, toolManager tool.ManagerInterface) *UpstreamWorker
NewUpstreamWorker creates a new UpstreamWorker.
bus is the event bus used for receiving requests and publishing results. toolManager is the tool manager that will handle the actual tool execution.
func (*UpstreamWorker) Start ¶
func (w *UpstreamWorker) Start(ctx context.Context)
Start launches the worker in a new goroutine. It subscribes to tool execution requests on the event bus and will continue to process them until the provided context is canceled.
ctx is the context that controls the lifecycle of the worker.