Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultSocketPath() string
- func EnsureRunning(ctx context.Context) error
- type Client
- func (c *Client) AnswerTask(taskID, questionID, answer string) error
- func (c *Client) ApplyAction(taskID string, req api.ApplyActionRequest) (*api.ActionApplication, error)
- func (c *Client) AttachJob(jobID string, stdin io.Reader, stdout io.Writer) error
- func (c *Client) CreateTask(req api.CreateTaskRequest) (*orchestrator.Task, error)
- func (c *Client) DeleteTask(id string) error
- func (c *Client) Do(method, path string, body any, result any) error
- func (c *Client) DoWithContentType(method, path, contentType string, body []byte, result any) error
- func (c *Client) DuplicateTask(id string) (*orchestrator.Task, error)
- func (c *Client) GetProject(id string) (*orchestrator.Project, error)
- func (c *Client) GetRaw(path string) (statusCode int, body []byte, err error)
- func (c *Client) GetTaskDetail(id string) (*api.TaskDetailView, error)
- func (c *Client) ListJobs(filter api.JobListFilter) ([]api.JobWithContext, error)
- func (c *Client) ListProjects() ([]*orchestrator.Project, error)
- func (c *Client) ListTasks(filter TaskListFilter) ([]*orchestrator.Task, error)
- func (c *Client) ListWorkspaces() ([]*orchestrator.WorkspaceSummary, error)
- func (c *Client) RerunTask(id string, autoStart bool) (*orchestrator.Task, error)
- func (c *Client) ResizeJob(jobID string, rows, cols int) error
- func (c *Client) UpdateTask(id string, req api.UpdateTaskRequest) (*orchestrator.Task, error)
- type TaskListFilter
Constants ¶
const (
// NoAutostartEnv disables automatic server startup when set to "1".
NoAutostartEnv = "BOID_NO_AUTOSTART"
)
Variables ¶
var ErrAttachDetached = errors.New("attach detached")
Functions ¶
func DefaultSocketPath ¶
func DefaultSocketPath() string
func EnsureRunning ¶
EnsureRunning ensures the boid server is running, starting it automatically if it is not. It uses a file lock to prevent concurrent start races.
If BOID_NO_AUTOSTART=1, auto-start is skipped and an error is returned when the server is not reachable.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewUnixClient ¶
func (*Client) AnswerTask ¶
AnswerTask submits an answer for an awaiting task via POST /api/tasks/{id}/answer.
func (*Client) ApplyAction ¶
func (c *Client) ApplyAction(taskID string, req api.ApplyActionRequest) (*api.ActionApplication, error)
ApplyAction sends an action to POST /api/tasks/{taskID}/actions.
func (*Client) CreateTask ¶
func (c *Client) CreateTask(req api.CreateTaskRequest) (*orchestrator.Task, error)
CreateTask creates a new task via POST /api/tasks.
func (*Client) DeleteTask ¶
DeleteTask deletes a task via DELETE /api/tasks/{id}.
func (*Client) DoWithContentType ¶
DoWithContentType performs an HTTP request with a custom Content-Type and raw body.
func (*Client) DuplicateTask ¶
func (c *Client) DuplicateTask(id string) (*orchestrator.Task, error)
DuplicateTask duplicates a task via POST /api/tasks/{id}/duplicate.
func (*Client) GetProject ¶
func (c *Client) GetProject(id string) (*orchestrator.Project, error)
GetProject fetches a single project by ID via GET /api/projects/{id}.
func (*Client) GetRaw ¶
GetRaw performs a GET request and returns the raw response body and status code.
func (*Client) GetTaskDetail ¶
func (c *Client) GetTaskDetail(id string) (*api.TaskDetailView, error)
GetTaskDetail fetches task metadata + actions + jobs for a given task ID.
func (*Client) ListJobs ¶
func (c *Client) ListJobs(filter api.JobListFilter) ([]api.JobWithContext, error)
ListJobs - フィルタ付きで全プロジェクト横断のジョブ一覧を取得
func (*Client) ListProjects ¶
func (c *Client) ListProjects() ([]*orchestrator.Project, error)
ListProjects fetches all projects.
func (*Client) ListTasks ¶
func (c *Client) ListTasks(filter TaskListFilter) ([]*orchestrator.Task, error)
ListTasks fetches tasks with optional status and project filters.
func (*Client) ListWorkspaces ¶
func (c *Client) ListWorkspaces() ([]*orchestrator.WorkspaceSummary, error)
ListWorkspaces fetches all workspaces.
func (*Client) RerunTask ¶
RerunTask resets a done/aborted task to pending via POST /api/tasks/{id}/rerun.
func (*Client) UpdateTask ¶
func (c *Client) UpdateTask(id string, req api.UpdateTaskRequest) (*orchestrator.Task, error)
UpdateTask updates the title and description of a task via PATCH /api/tasks/{id}.
type TaskListFilter ¶
TaskListFilter holds filters for listing tasks.