Skip to content

Commit

Permalink
Document FailedState and ErrorMsg fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Oct 17, 2023
1 parent 4899d49 commit ee57bcc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions internal/pkg/agent/application/upgrade/details/details.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@ type Details struct {
type DetailsMetadata struct {
ScheduledAt string
DownloadPercent float64
FailedState State
ErrorMsg string

// FailedState is the state an upgrade was in if/when it failed. Use the
// Fail() method of UpgradeDetails to correctly record details when
// an upgrade fails.
FailedState State

// ErrorMsg is any error message encountered if/when an upgrade fails. Use
// the Fail() method of UpgradeDetails to correctly record details when
// an upgrade fails.
ErrorMsg string
}

func NewDetails(targetVersion string, initialState State, actionID string) *Details {
Expand Down

0 comments on commit ee57bcc

Please sign in to comment.