service

package
v15.5.6 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check added in v15.3.0

type Check struct {
	Run         func(ctx context.Context) error
	Name        string
	Description string
	Severity    Severity
}

Check represents a check to be performed to validate Gitaly cluster health. Checks are used to diagnose issues with Praefect cluster setup through the Praefect CLI `check` subcommand and also performed through the invoking of the readiness RPC.

func NewGitalyNodeConnectivityCheck added in v15.3.0

func NewGitalyNodeConnectivityCheck(conf config.Config, w io.Writer, quiet bool) *Check

NewGitalyNodeConnectivityCheck returns a check that ensures Praefect can talk to all nodes of all virtual storages

func NewPostgresReadWriteCheck added in v15.3.0

func NewPostgresReadWriteCheck(conf config.Config, w io.Writer, quiet bool) *Check

NewPostgresReadWriteCheck returns a check that ensures Praefect can read and write to the database

func NewPraefectMigrationCheck added in v15.3.0

func NewPraefectMigrationCheck(conf config.Config, w io.Writer, quiet bool) *Check

NewPraefectMigrationCheck returns a Check that checks if all praefect migrations have run

func NewUnavailableReposCheck added in v15.3.0

func NewUnavailableReposCheck(conf config.Config, w io.Writer, quiet bool) *Check

NewUnavailableReposCheck returns a check that finds the number of repositories without a valid primary

type CheckFunc added in v15.3.0

type CheckFunc func(conf config.Config, w io.Writer, quiet bool) *Check

CheckFunc is a function type that takes a praefect config and returns a Check

func AllChecks added in v15.3.0

func AllChecks() []CheckFunc

AllChecks returns slice of all checks that can be executed for praefect.

func NewClockSyncCheck added in v15.3.0

func NewClockSyncCheck(clockDriftCheck func(ntpHost string, driftThreshold time.Duration) (bool, error)) CheckFunc

NewClockSyncCheck returns a function that returns a check that verifies if system clock is in sync.

func ReadinessChecks added in v15.5.5

func ReadinessChecks() []CheckFunc

ReadinessChecks returns the checks invoked by the Praefect readiness RPC.

type Connections

type Connections map[string]map[string]*grpc.ClientConn

Connections contains connections to Gitaly nodes keyed by virtual storage and storage

This duplicates the praefect.Connections type as it is not possible to import anything from `praefect` to `info` or `server` packages due to cyclic dependencies.

type Severity added in v15.3.0

type Severity string

Severity is a type that indicates the severity of a check

const (
	// Warning indicates a severity level of warning
	Warning Severity = "warning"
	// Fatal indicates a severity level of fatal
	// any checks that are Fatal will prevent Praefect from starting up
	Fatal = "fatal"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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