Documentation
¶
Index ¶
- type CreateWorkerParams
- type Manager
- func (m *Manager) CancelExecution(_ context.Context, executionID string) error
- func (m *Manager) CreateWorker(p CreateWorkerParams) (model.Worker, error)
- func (m *Manager) DeleteWorker(id string, deleteWorkDir bool) error
- func (m *Manager) EnabledEngines() []string
- func (m *Manager) ExecuteWorker(ctx context.Context, workerID, triggerInput, sessionID string, resume bool) (model.WorkerExecution, error)
- func (m *Manager) StopExecution(executionID string) error
- func (m *Manager) ValidateEngine(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateWorkerParams ¶ added in v0.0.22
type CreateWorkerParams struct {
Name string
Description string
Memory string
WorkDir string
PermissionScopes string
Engine string
}
CreateWorkerParams holds the inputs for creating a new worker.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager( workerBaseDir string, bc config.BeeConfig, ws *store.WorkerStore, es *store.ExecutionStore, engines map[string]ai.EngineAdapter, engineCfg *enginecfg.Store, envService *env.Service, ) *Manager
func (*Manager) CancelExecution ¶
CancelExecution implements task.ExecutionManager. It stops the active worker process for the given executionID.
func (*Manager) CreateWorker ¶
func (m *Manager) CreateWorker(p CreateWorkerParams) (model.Worker, error)
func (*Manager) EnabledEngines ¶ added in v0.0.26
func (*Manager) ExecuteWorker ¶
func (m *Manager) ExecuteWorker(ctx context.Context, workerID, triggerInput, sessionID string, resume bool) (model.WorkerExecution, error)
ExecuteWorker runs a worker. When resume is true, the AI engine will attempt to resume the session identified by sessionID; otherwise it starts a fresh session. sessionID must always be non-empty; callers are responsible for generating it.
func (*Manager) StopExecution ¶
func (*Manager) ValidateEngine ¶ added in v0.0.26
An empty name is accepted (means "use server default").