overview

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package overview builds the install page's header, count tiles and gateway list.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RowState

func RowState(worst health.State, unknown bool) health.State

RowState is a state from the worst finding; if a required signal is missing and there is no error, it is unknown, never green (D-006).

Types

type Count

type Count struct {
	Group       string       `json:"group"`
	Kind        string       `json:"kind"`
	Category    string       `json:"category"`
	DisplayName string       `json:"displayName"`
	Count       int          `json:"count"`
	Access      cache.Access `json:"access"`
}

Count is one count tile.

type GatewayRow

type GatewayRow struct {
	Ref   objects.Ref  `json:"ref"`
	Class string       `json:"class"`
	State health.State `json:"state"`
	// Reason says why State is not healthy (D-063).
	Reason         *health.RowReason `json:"reason,omitempty"`
	Listeners      int               `json:"listeners"`
	AttachedRoutes int32             `json:"attachedRoutes"`
	Addresses      []string          `json:"addresses"`
}

GatewayRow is one row of the gateway table.

type Header struct {
	ID              string        `json:"id"`
	DisplayName     string        `json:"displayName"`
	Namespace       string        `json:"namespace,omitempty"`
	Name            string        `json:"name,omitempty"`
	Version         string        `json:"version"`
	Edition         string        `json:"edition"`
	ControllerNames []string      `json:"controllerNames"`
	Readiness       Readiness     `json:"readiness"`
	Scope           *ScopeSummary `json:"scope,omitempty"`
}

Header is the install page header. Namespace, Name and Scope are absent where the platform has no such notion (D-016).

type Overview

type Overview struct {
	Header   Header       `json:"header"`
	Counts   []Count      `json:"counts"`
	Gateways []GatewayRow `json:"gateways"`
}

Overview is the install page model.

func Build

func Build(res install.Resolved, owned *install.Owned, snap *cache.Snapshot, served []kinds.Served, rep health.Report, plat platform.Info) Overview

Build assembles the overview of one install from the objects it owns. It is pure, so the API can rebuild it over the owned objects a caller may see.

type Readiness

type Readiness struct {
	State   ReadinessState `json:"state"`
	Ready   *int32         `json:"ready,omitempty"`
	Desired *int32         `json:"desired,omitempty"`
}

Readiness is the controller's readiness; replica counts are present only where the platform runs workloads.

type ReadinessState

type ReadinessState string

ReadinessState is the controller readiness a provider reports (D-016).

const (
	ReadinessReady       ReadinessState = "ready"
	ReadinessNotReady    ReadinessState = "not-ready"
	ReadinessUnknown     ReadinessState = "unknown"
	ReadinessNotObserved ReadinessState = "not-observed"
)

Readiness states. Not observed means the platform cannot see readiness, which is not a failure.

type ScopeSummary

type ScopeSummary struct {
	Mode      string                 `json:"mode"`
	Selectors []metav1.LabelSelector `json:"selectors,omitempty"`
	Error     string                 `json:"error,omitempty"`
	// Source is where the scope was read from, for example "deployment template".
	Source  string `json:"source,omitempty"`
	Watched int    `json:"watched"`
	Total   int    `json:"total"`
}

ScopeSummary describes an install's namespace scope.

Jump to

Keyboard shortcuts

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