github.com/l1fe-labs/forge-go/health
Go health package.
Go health package.
Package contract
| Field | Value |
|---|---|
| Language | go |
| Source version | module source snapshot |
| Manifest | forge-go/go.mod |
| Source files | 3 |
| Evidence | Source reference; registry publication and runtime conformance are separate checks |
Import boundary
import "github.com/l1fe-labs/forge-go/health"Use a source checkout or your verified private registry. Manifest coordinates identify the package; they do not establish that a public registry release exists.
Source reference
Download package reference JSON. Each original source file and generated declaration artifact has its own SHA-256 digest. Function bodies and constant values are omitted from downloads. These are source declaration inventories, not compiler-resolved rustdoc, TypeDoc, DocC, or Dokka output. Private modules can contain public declarations that are not reachable through the package boundary; consult the entry point before importing.
events.go
Read declaration text · 2 declaration entries
func EmitLifecycleEvent(emitter core.TelemetryEmitter, transition LifecycleTransition, agentDID string)
func EmitHealthSnapshot(emitter core.TelemetryEmitter, profile *HealthProfile, agentDID string)lifecycle.go
Read declaration text · 13 declaration entries
type LifecycleState string
const (
// StateInitializing is the initial state during agent setup (loading config, identity).
StateInitializing LifecycleState;
func (s LifecycleState) String() string
func (s LifecycleState) IsTerminal() bool
func (s LifecycleState) CanTransitionTo(target LifecycleState) bool
type LifecycleTransition struct
type LifecycleManager struct
func NewLifecycleManager() *LifecycleManager
func (lm *LifecycleManager) State() LifecycleState
func (lm *LifecycleManager) CreatedAt() time.Time
func (lm *LifecycleManager) Transition(target LifecycleState, reason string) error
func (lm *LifecycleManager) History() []LifecycleTransition
func (lm *LifecycleManager) OnTransition(fn func(LifecycleTransition))
func (lm *LifecycleManager) TransitionCount() intprofile.go
Read declaration text · 22 declaration entries
type HealthStatus string
const (
// HealthStatusHealthy indicates the agent is operating normally.
HealthStatusHealthy HealthStatus;
func (s HealthStatus) String() string
type HealthProfile struct
func NewHealthProfile() *HealthProfile
type Snapshot struct
func (p *HealthProfile) Snapshot() Snapshot
func (p *HealthProfile) RecordError()
func (p *HealthProfile) RecordToolInvocation()
func (p *HealthProfile) RecordInference(tokens int64)
func (p *HealthProfile) UpdateCPUUsage(percent float64)
func (p *HealthProfile) UpdateMemoryUsage(bytes int64)
func (p *HealthProfile) SetActiveTasks(count uint32)
func (p *HealthProfile) RecordTaskCompleted()
func (p *HealthProfile) UpdateErrorRate(rate float64)
func (p *HealthProfile) UpdateAvgLatencyMs(ms float64)
func (p *HealthProfile) UpdateToolSuccessRate(rate float64)
func (p *HealthProfile) UpdateGenerationSuccessRate(rate float64)
func (p *HealthProfile) ErrorCount() int64
func (p *HealthProfile) ToolInvocations() int64
func (p *HealthProfile) InferenceCalls() int64
func (p *HealthProfile) InferenceTokens() int64
func (p *HealthProfile) UptimeSeconds() float64