Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion upgrader.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ func (u *Upgrader) HasParent() bool {
return u.parent != nil
}

// Upgrade triggers an upgrade.
// Upgrade starts a zero-downtime upgrade of the current process.
//
// It does not return immediately after spawning the child: the call blocks
// until the upgrade either succeeds or fails. On failure it returns an error
// (for example if the child exits uncleanly or the process is already
// upgrading/terminating). On success the parent should drain work and exit
// so the child can take over.
func (u *Upgrader) Upgrade() error {
response := make(chan error, 1)
select {
Expand Down