kernel

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package kernel is the seam between the root package and the integration packages that register with an App's kernel registries rather than with its DI container. The root package cannot be imported back by the integrations' internals, and the registries are not part of the public API, so the root installs the entry points here at init and the integrations call them.

Index

Constants

This section is empty.

Variables

View Source
var Manage func(app any, c Component)

Manage adds c to app, a *credo.App, as App.Manage does, and panics as it does. The root package sets it at init.

View Source
var RegisterStore func(app any, s Store)

RegisterStore adds a store registration to app, a *credo.App. It panics on misuse, naming the registering call. The root package sets it at init.

Functions

This section is empty.

Types

type Component

type Component struct {
	// Value is a component value, or a constructor over DI parameters, as
	// App.Manage takes it.
	Value any
	// Name names the component in reports and readiness.
	Name string
	// Ingress places the component in the ingress tier.
	Ingress bool
	// IngressRemedy is how the integration's registration declares the
	// component ingress, for the Finalize finding of an internal component
	// that depends on an ingress one (e.g. a worker's Tier field).
	IngressRemedy string
}

Component is a component an integration adds to an App on behalf of its own registration call.

type Store

type Store struct {
	// Name is the store's name in readiness reports.
	Name string
	// Type is the binding type R of store.Register[R].
	Type reflect.Type
	// Ping verifies the built value; the start phase calls it once, before
	// the value's consumers start, and a failure is a start failure.
	Ping func(ctx context.Context, value any) error
	// Probe builds the readiness probe of the built value, once.
	Probe func(value any) *internalhealth.Probe
}

Store is one store registration: the binding type the start phase pings and readiness reports.

Jump to

Keyboard shortcuts

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