Documentation
¶
Overview ¶
Application scenarios: - Provide one provider-neutral home for the framework's gRPC governance interceptor presets. - Keep interceptor ordering explicit while reusing concrete tracing/metadata/runtime helpers. - Let bootstrap and top-level helpers assemble gRPC governance without reaching into provider internals directly.
适用场景: - 为框架的 gRPC 治理拦截器预设提供统一的 provider-neutral 主线目录。 - 在复用 tracing、metadata、runtime helper 的同时,保持拦截器顺序显式可控。 - 让 bootstrap 和顶层 helper 在不直接下沉 provider 内部细节的前提下装配 gRPC 治理能力。
Index ¶
- func ChainStream(interceptors ...grpc.StreamServerInterceptor) []grpc.StreamServerInterceptor
- func ChainUnary(interceptors ...grpc.UnaryServerInterceptor) []grpc.UnaryServerInterceptor
- func DefaultStreamServerInterceptors(opts DefaultServerPresetOptions) []grpc.StreamServerInterceptor
- func DefaultUnaryServerInterceptors(opts DefaultServerPresetOptions) []grpc.UnaryServerInterceptor
- type DefaultServerPresetOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChainStream ¶
func ChainStream(interceptors ...grpc.StreamServerInterceptor) []grpc.StreamServerInterceptor
ChainStream returns the stream interceptors unchanged in the declared order.
ChainStream 按声明顺序返回 stream 拦截器集合。
func ChainUnary ¶
func ChainUnary(interceptors ...grpc.UnaryServerInterceptor) []grpc.UnaryServerInterceptor
ChainUnary returns the unary interceptors unchanged in the declared order.
ChainUnary 按声明顺序返回 unary 拦截器集合。
func DefaultStreamServerInterceptors ¶
func DefaultStreamServerInterceptors(opts DefaultServerPresetOptions) []grpc.StreamServerInterceptor
DefaultStreamServerInterceptors returns the default stream server governance interceptors.
DefaultStreamServerInterceptors 返回默认 stream 服务端治理拦截器。
func DefaultUnaryServerInterceptors ¶
func DefaultUnaryServerInterceptors(opts DefaultServerPresetOptions) []grpc.UnaryServerInterceptor
DefaultUnaryServerInterceptors returns the default unary server governance interceptors.
DefaultUnaryServerInterceptors 返回默认 unary 服务端治理拦截器。
Types ¶
type DefaultServerPresetOptions ¶
type DefaultServerPresetOptions struct {
Tracer observabilitycontract.Tracer
ServiceName string
MetadataPropagator transportcontract.MetadataPropagator
}
DefaultServerPresetOptions controls the default gRPC server governance preset.
DefaultServerPresetOptions 用于控制默认 gRPC 服务端治理预设。