bootstrap

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observability

type Observability struct {
	Logger clog.Logger
	Meter  metrics.Meter
	// contains filtered or unexported fields
}

Observability 持有应用创建的可观测性资源。

调用方只向业务组件注入 Logger 和 Meter;底层资源统一由 Shutdown 关闭。

func Init

func Init(serviceName string, metricsPort int) (*Observability, error)

Init 初始化一组身份一致的日志、指标和链路追踪资源。

func (*Observability) Shutdown added in v1.0.0

func (o *Observability) Shutdown(ctx context.Context) error

Shutdown 按 metrics、trace、logger 的顺序释放资源。

Jump to

Keyboard shortcuts

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