server

package
v2.16.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: AGPL-3.0 Imports: 30 Imported by: 1

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 Params

type Params struct {
	DB                   *reform.DB
	AgentsRegistry       agentsRegistry
	VMDB                 prometheusService
	VMAlert              prometheusService
	Alertmanager         alertmanagerService
	ChecksService        checksService
	VMAlertExternalRules vmAlertExternalRules
	Supervisord          supervisordService
	TelemetryService     telemetryService
	PlatformService      platformService
	AwsInstanceChecker   *AWSInstanceChecker
	GrafanaClient        grafanaClient
	RulesService         rulesService
}

Params holds the parameters needed to create a new service.

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(params *Params) (*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) PlatformSignIn

PlatformSignIn links that PMM instance to Percona Platform user and created new session.

func (*Server) PlatformSignOut

PlatformSignOut logouts that PMM instance from Percona Platform account.

func (*Server) PlatformSignUp

PlatformSignUp creates new Percona Platform user with given email and password.

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) UpdateConfigurations

func (s *Server) UpdateConfigurations() error

UpdateConfigurations updates supervisor config and requests configuration update for VictoriaMetrics components.

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