job

package
v0.1.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidFormat = errors.New("job follow: invalid format")

ErrInvalidFormat indicates an unsupported format value.

Functions

func RunLog

func RunLog(ctx context.Context, opts LogOptions) error

func RunStatus

func RunStatus(ctx context.Context, opts StatusOptions) error

Types

type FollowCommand

type FollowCommand struct {
	Client  stream.Client
	BaseURL *url.URL
	JobID   domaintypes.JobID
	Format  logs.Format
	Output  io.Writer
}

FollowCommand streams job logs from the job SSE endpoint.

func (FollowCommand) Run

func (c FollowCommand) Run(ctx context.Context) error

Run executes the streaming command against /v1/jobs/{job_id}/logs.

type GetStatusCommand

type GetStatusCommand struct {
	Client  *http.Client
	BaseURL *url.URL
	JobID   domaintypes.JobID
}

func (GetStatusCommand) Run

type LogOptions

type LogOptions struct {
	JobID       string
	Format      string
	Follow      bool
	MaxRetries  int
	IdleTimeout time.Duration
	Timeout     time.Duration
	Output      io.Writer
}

type StatusOptions

type StatusOptions struct {
	JobID  string
	Output io.Writer
}

type StatusResult

type StatusResult struct {
	JobID       domaintypes.JobID     `json:"job_id"`
	RunID       domaintypes.RunID     `json:"run_id"`
	RepoID      domaintypes.RepoID    `json:"repo_id"`
	Attempt     int32                 `json:"attempt"`
	Name        string                `json:"name"`
	JobType     domaintypes.JobType   `json:"job_type"`
	Status      domaintypes.JobStatus `json:"status"`
	JobImage    string                `json:"job_image"`
	NodeID      *domaintypes.NodeID   `json:"node_id"`
	ExitCode    *int32                `json:"exit_code"`
	StartedAt   *time.Time            `json:"started_at"`
	FinishedAt  *time.Time            `json:"finished_at"`
	DurationMs  int64                 `json:"duration_ms"`
	RepoShaIn   string                `json:"repo_sha_in"`
	RepoShaOut  string                `json:"repo_sha_out"`
	RepoShaIn8  string                `json:"repo_sha_in8"`
	RepoShaOut8 string                `json:"repo_sha_out8"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL