server

package
v2.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: AGPL-3.0 Imports: 28 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 AWSInstanceChecker

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

AWSInstanceChecker checks AWS EC2 instance ID for AMI.

func NewAWSInstanceChecker

func NewAWSInstanceChecker(db *reform.DB, telemetryService telemetryService) *AWSInstanceChecker

NewAWSInstanceChecker creates a new AWSInstanceChecker.

func (*AWSInstanceChecker) MustCheck

func (c *AWSInstanceChecker) MustCheck() bool

MustCheck returns true if instance ID must be checked: this is AMI, and it wasn't checked already.

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, telemetryService telemetryService, checker *AWSInstanceChecker) (*Server, error)

NewServer returns new server for Server service.

func (*Server) AWSInstanceCheck

AWSInstanceCheck checks AWS EC2 instance ID.

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