Documentation
¶
Overview ¶
Package logs implements the business logic for fetching CircleCI job logs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LastFailed ¶
func LastFailed(ctx context.Context, client *apiclient.Client, runID string) (jobNumber int64, projectSlug string, err error)
LastFailed finds the latest failed job across all workflows in a run. If all workflows passed, it returns ErrNoneFound with a clear message so callers can surface a clean error rather than "no failed jobs found" after a full traversal.
Types ¶
type ErrNoneFound ¶
type ErrNoneFound struct {
Reason string
}
ErrNoneFound is returned when an inference strategy finds no matching job.
func (*ErrNoneFound) Error ¶
func (e *ErrNoneFound) Error() string
type StepLog ¶
type StepLog struct {
Name string `json:"step"`
Status string `json:"status"`
ExitCode *int `json:"exit_code,omitempty"`
Output string `json:"output"`
}
StepLog holds the output of a single job step.
func ForJob ¶
func ForJob(ctx context.Context, client *apiclient.Client, projectSlug string, jobNumber int64, stepFilter string) ([]StepLog, error)
ForJob fetches the log output for every step in a job, returning one StepLog per step. If stepFilter is non-empty, only steps whose name matches are included. Steps are fetched concurrently (up to maxStepParallelism at a time); output order matches the original step order.