server

package
v2.0.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package server implements pmm-managed Server API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents service for checking PMM Server status and changing settings.

func NewServer

func NewServer(db *reform.DB, prometheus prometheusService, supervisord supervisordService) (*Server, error)

NewServer returns new server for Server service.

func (*Server) ChangeSettings

ChangeSettings changes PMM Server settings.

func (*Server) CheckUpdates

CheckUpdates checks PMM Server updates availability.

func (*Server) GetSettings

GetSettings returns current PMM Server settings.

func (*Server) Readiness

Readiness returns an error when some PMM Server component is not ready yet or is being restarted. It can be used as for Docker health check or Kubernetes readiness probe.

func (*Server) StartUpdate

StartUpdate starts PMM Server update.

func (*Server) UpdateSettingsFromEnv

func (s *Server) UpdateSettingsFromEnv(env []string) error

UpdateSettingsFromEnv updates settings in the database with environment variables values. It returns only validation or database errors; invalid environment variables are logged and skipped.

func (*Server) UpdateStatus

UpdateStatus returns PMM Server update status.

func (*Server) Version

Version returns PMM Server version.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL