middleware

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainBuilder added in v0.2.2

type ChainBuilder struct {
	// contains filtered or unexported fields
}

ChainBuilder 构建标准 client 中间件链。

默认链不包含 jwt token 透传:跨服务调用时若需将入站 Bearer token 转发到下游,调用方需显式 append `security/authn/jwt.Client()`,详见该 sub-package godoc 与 design.md Decision 5。

func NewChainBuilder added in v0.2.2

func NewChainBuilder(l *slog.Logger) *ChainBuilder

NewChainBuilder 创建 client 中间件链构建器。

func (*ChainBuilder) Build added in v0.2.2

func (b *ChainBuilder) Build() []middleware.Middleware

Build 构建并返回 client 中间件切片。

func (*ChainBuilder) WithMetrics added in v0.2.2

func (b *ChainBuilder) WithMetrics(m *metrics.Metrics) *ChainBuilder

WithMetrics 启用 client metrics 中间件。

func (*ChainBuilder) WithTrace added in v0.2.2

func (b *ChainBuilder) WithTrace(t *corev1.Trace) *ChainBuilder

WithTrace 启用 client tracing 中间件。

func (*ChainBuilder) WithoutCircuitBreaker added in v0.2.2

func (b *ChainBuilder) WithoutCircuitBreaker() *ChainBuilder

WithoutCircuitBreaker 禁用 client 熔断中间件。

Jump to

Keyboard shortcuts

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