instancehealth

package
v0.0.0-...-b2e0f1d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChecks

func NewChecks(
	since time.Duration,
	instanceHealth Indicators,
) []func(out *output.Output) error

NewChecks returns a set of checks against the given inputs to validate the health of a Sourcegraph application. It is designed primarily to validate information that can be provided via the GraphQL API - see GetSummary for more details.

Each test errors with only a brief summary of what went wrong, and only if the error is critical. Detailed output should be written to out.

Types

type Indicators

type Indicators struct {
	Site struct {
		Configuration struct {
			ValidationMessages []string
		}
		Alerts []struct {
			Type    string
			Message string
		}
		MonitoringStatistics struct {
			Alerts []struct {
				Name    string
				Average float64
			}
		}
	}
	ExternalServices struct {
		Nodes []struct {
			Kind          string
			ID            string
			LastSyncError *string
			SyncJobs      struct {
				Nodes []struct {
					State      string
					FinishedAt time.Time
				}
			}
		}
	}
	PermissionsSyncJobs struct {
		Nodes []permissionSyncJob
	}
}

Indicators are values from the Sourcegraph GraphQL API that help indicate the health of and instance.

func GetIndicators

func GetIndicators(ctx context.Context, client api.Client) (*Indicators, error)

GetIndicators retrieves summary data from a Sourcegraph instance's GraphQL API for assessing instance health.

Jump to

Keyboard shortcuts

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