startup

package
v1.141.0 Latest Latest
Warning

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

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

Documentation

Overview

Package startup runs the platform's initialization phases and reports them (#1898): one log line naming the version and every phase's duration, and a platform.startup span with a child per phase. Before it a slow boot was a gap between two timestamps nobody had correlated, and a boot that failed named the error but not the phase.

Index

Constants

View Source
const SpanName = "platform.startup"

SpanName is the root span every boot's phases are children of.

Variables

This section is empty.

Functions

func Run

func Run(phases []Phase) error

Run runs phases in order, stopping at the first that fails, and reports what ran. The span is written after the phases finish, with the times they were measured at, because the first phase is the one that installs the tracer.

Types

type Phase

type Phase struct {
	Name string
	Run  func() error
}

Phase is one named step of initialization.

func Do

func Do(name string, run func()) Phase

Do is a Phase for a step that cannot fail.

Jump to

Keyboard shortcuts

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