healthplatformimpl

package
v0.0.0-...-168d06c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package healthplatformimpl implements the health-platform component interface

Index

Constants

Variables

This section is empty.

Functions

func Diagnose

func Diagnose(healthplatformComp healthplatformdef.Component, diagCfg diagnose.Config) []diagnose.Diagnosis

Diagnose converts health platform issues to diagnose format When diagCfg.Verbose is true, remediations are included in the output

Types

type IssueState

type IssueState = healthplatform.IssueState

IssueState is a type alias for the proto enum healthplatform.IssueState.

type PersistedIssue

type PersistedIssue struct {
	IssueID    string     `json:"issue_id"`
	State      IssueState `json:"state"`
	FirstSeen  string     `json:"first_seen"`
	LastSeen   string     `json:"last_seen"`
	ResolvedAt string     `json:"resolved_at,omitempty"`
}

PersistedIssue tracks issue state for disk persistence. Custom JSON marshaling keeps the on-disk format unchanged (state as string).

func (*PersistedIssue) MarshalJSON

func (p *PersistedIssue) MarshalJSON() ([]byte, error)

MarshalJSON converts the proto IssueState enum to its string representation for disk.

func (*PersistedIssue) UnmarshalJSON

func (p *PersistedIssue) UnmarshalJSON(data []byte) error

UnmarshalJSON parses the string state from disk back to the proto enum.

type PersistedState

type PersistedState struct {
	UpdatedAt string                     `json:"updated_at"`
	Issues    map[string]*PersistedIssue `json:"issues"`
}

PersistedState is the full state written to disk

type Provides

type Provides struct {
	compdef.Out
	Comp          healthplatformdef.Component
	APIGetIssues  api.AgentEndpointProvider
	FlareProvider flaretypes.Provider
}

Provides defines the output of the health-platform component

func NewComponent

func NewComponent(reqs Requires) (Provides, error)

NewComponent creates a new health-platform component It initializes the component with its dependencies and configures telemetry metrics.

type Requires

type Requires struct {
	Lifecycle compdef.Lifecycle
	Config    config.Component
	Log       log.Component
	Telemetry telemetry.Component
	Hostname  hostnameinterface.Component
}

Requires defines the dependencies for the health-platform component

Directories

Path Synopsis
Package issues provides feature modules that bundle health checks with their remediations.
Package issues provides feature modules that bundle health checks with their remediations.
checkfailure
Package checkfailure provides an issue module for check execution failures.
Package checkfailure provides an issue module for check execution failures.
dockerpermissions
Package dockerpermissions provides a complete issue module for Docker permission problems.
Package dockerpermissions provides a complete issue module for Docker permission problems.
rofspermissions
Package rofspermissions provides a complete module for handling Read-Only Filesystem permission issues specifically checking if the Agent has write permissions to all the expected directories.
Package rofspermissions provides a complete module for handling Read-Only Filesystem permission issues specifically checking if the Agent has write permissions to all the expected directories.

Jump to

Keyboard shortcuts

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