Documentation ¶
Overview ¶
Package supervisord provides facilities for working with Supervisord.
Index ¶
- type Logs
- type Service
- func (s *Service) ForceCheckUpdates() error
- func (s *Service) InstalledPMMVersion() *version.PackageInfo
- func (s *Service) LastCheckUpdatesResult() (*version.UpdateCheckResult, time.Time)
- func (s *Service) Run(ctx context.Context)
- func (s *Service) StartUpdate() (uint32, error)
- func (s *Service) UpdateConfiguration(settings *models.Settings) error
- func (s *Service) UpdateLog(offset uint32) ([]string, uint32, error)
- func (s *Service) UpdateRunning() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logs ¶
type Logs struct {
// contains filtered or unexported fields
}
Logs is responsible for interactions with logs.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is responsible for interactions with Supervisord via supervisorctl.
func (*Service) ForceCheckUpdates ¶
ForceCheckUpdates forces check for PMM updates. Result can be obtained via LastCheckUpdatesResult.
func (*Service) InstalledPMMVersion ¶
func (s *Service) InstalledPMMVersion() *version.PackageInfo
InstalledPMMVersion returns currently installed PMM version information.
func (*Service) LastCheckUpdatesResult ¶
func (s *Service) LastCheckUpdatesResult() (*version.UpdateCheckResult, time.Time)
LastCheckUpdatesResult returns last PMM update check result and last check time.
func (*Service) StartUpdate ¶
StartUpdate starts pmm-update-perform supervisord program with some preparations. It returns initial log file offset.
func (*Service) UpdateConfiguration ¶
UpdateConfiguration updates Prometheus and qan-api2 configurations, restarting them if needed.
func (*Service) UpdateLog ¶
UpdateLog returns some lines and a new offset from pmm-update-perform log starting from the given offset. It may return zero lines and the same offset. Caller is expected to handle this.
func (*Service) UpdateRunning ¶
UpdateRunning returns true if pmm-update-perform supervisord program is running or being restarted, false if it is not running / failed.