Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a Linux-only self-update service for the bootstrap node. It responds to internal trigger() calls issued via ObservedHigherVersion. When triggered, it checks GitHub for a newer release and replaces the running binary if one is found, then exits so the supervisor can restart the process with the new version.
func NewService ¶
func NewService( ctx context.Context, currentVersion string, interruptChan chan<- os.Signal, ) *Service
NewService creates a new self-update service for the given version string.
func (*Service) ObservedHigherVersion ¶
ObservedHigherVersion records that the peer identified by peerID is running a higher version than this node. Each peer is counted at most once; once peerVersionThreshold distinct peers have been recorded, a self-update is triggered exactly once.