Documentation
¶
Index ¶
- Variables
- func PullOutput(output, url, ref, branch, targetDir string, targetGroup console.Group) error
- func PullOutputWithRetry(output, url, ref, branch, targetDir string, targetGroup console.Group, ...) error
- func ViewBuildPipeline(build stainless.Build, target stainless.Target, ...) string
- func ViewHeader(label string, b stainless.Build) string
- func ViewStepSymbol(status, conclusion string) string
- type DownloadMsg
- type DownloadStatus
- type ErrorMsg
- type FetchBuildMsg
- type Model
- type TickMsg
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUserCancelled = errors.New("user cancelled")
Functions ¶
func PullOutput ¶
PullOutput handles downloading or cloning a build target output
func PullOutputWithRetry ¶
func PullOutputWithRetry(output, url, ref, branch, targetDir string, targetGroup console.Group, maxRetries int) error
PullOutputWithRetry wraps PullOutput with exponential backoff retry logic maxRetries: maximum number of retry attempts (0 means no retries, just one attempt) Uses 1s initial delay with exponential backoff, clamped at 30s max delay
func ViewBuildPipeline ¶
func ViewBuildPipeline(build stainless.Build, target stainless.Target, downloads map[stainless.Target]DownloadStatus, commitOnly bool, sp spinner.Model) string
ViewBuildPipeline renders the build pipeline for a target on a single line. Format: <language> <commit-status (padded)> <step symbols>
func ViewHeader ¶
ViewHeader renders a styled header with a label badge, build ID, config commit, and relative timestamp.
func ViewStepSymbol ¶
ViewStepSymbol returns a colored symbol for a build step status
Types ¶
type DownloadMsg ¶
type DownloadStatus ¶
type FetchBuildMsg ¶
type Model ¶
type Model struct {
stainless.Build // Current build. This component will keep fetching it until the build is completed. A zero value is permitted.
Client stainless.Client
Ctx context.Context
Branch string // Optional branch name for git checkout
Downloads map[stainless.Target]DownloadStatus // When a BuildTarget has a commit available, this target will download it, if it has been specified in the initialization.
Err error // This will be populated if the model concludes with an error
CommitOnly bool // When true, only show the commit step in the pipeline view
Spinner spinner.Model // Spinner for in-progress animation
}
Click to show internal directories.
Click to hide internal directories.