Movatterモバイル変換


[0]ホーム

URL:


httpfilter

package
v1.77.0Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License:Apache-2.0Imports:2Imported by:0

Details

Repository

github.com/grpc/grpc-go

Links

Documentation

Overview

Package httpfilter contains the HTTPFilter interface and a registry forstoring and retrieving their implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcRegister

func Register(bFilter)

Register registers the HTTP filter Builder to the filter map. b.TypeURLs()will be used as the types for this filter.

NOTE: this function must only be called during initialization time (i.e. inan init() function), and is not thread-safe. If multiple filters areregistered with the same type URL, the one registered last will take effect.

funcUnregisterForTesting

func UnregisterForTesting(typeURLstring)

UnregisterForTesting unregisters the HTTP Filter for testing purposes.

Types

typeClientInterceptorBuilder

type ClientInterceptorBuilder interface {// BuildClientInterceptor uses the FilterConfigs produced above to produce// an HTTP filter interceptor for clients.  config will always be non-nil,// but override may be nil if no override config exists for the filter.  It// is valid for Build to return a nil Interceptor and a nil error.  In this// case, the RPC will not be intercepted by this filter.BuildClientInterceptor(config, overrideFilterConfig) (iresolver.ClientInterceptor,error)}

ClientInterceptorBuilder constructs a Client Interceptor. If this type isimplemented by a Filter, it is capable of working on a client.

typeFilter

type Filter interface {// TypeURLs are the proto message types supported by this filter.  A filter// will be registered by each of its supported message types.TypeURLs() []string// ParseFilterConfig parses the provided configuration proto.Message from// the LDS configuration of this filter.  This may be an anypb.Any, a// udpa.type.v1.TypedStruct, or an xds.type.v3.TypedStruct for filters that// do not accept a custom type. The resulting FilterConfig will later be// passed to Build.ParseFilterConfig(proto.Message) (FilterConfig,error)// ParseFilterConfigOverride parses the provided override configuration// proto.Message from the RDS override configuration of this filter.  This// may be an anypb.Any, a udpa.type.v1.TypedStruct, or an// xds.type.v3.TypedStruct for filters that do not accept a custom type.// The resulting FilterConfig will later be passed to Build.ParseFilterConfigOverride(proto.Message) (FilterConfig,error)// IsTerminal returns whether this Filter is terminal or not (i.e. it must// be last filter in the filter chain).IsTerminal()bool}

Filter defines the parsing functionality of an HTTP filter. A Filter mayoptionally implement either ClientInterceptorBuilder orServerInterceptorBuilder or both, indicating it is capable of working on theclient side or server side or both, respectively.

funcGet

func Get(typeURLstring)Filter

Get returns the HTTPFilter registered with typeURL.

If no filter is register with typeURL, nil will be returned.

typeFilterConfig

type FilterConfig interface {// contains filtered or unexported methods}

FilterConfig represents an opaque data structure holding configuration for afilter. Embed this interface to implement it.

typeServerInterceptorBuilder

type ServerInterceptorBuilder interface {// BuildServerInterceptor uses the FilterConfigs produced above to produce// an HTTP filter interceptor for servers.  config will always be non-nil,// but override may be nil if no override config exists for the filter.  It// is valid for Build to return a nil Interceptor and a nil error.  In this// case, the RPC will not be intercepted by this filter.BuildServerInterceptor(config, overrideFilterConfig) (iresolver.ServerInterceptor,error)}

ServerInterceptorBuilder constructs a Server Interceptor. If this type isimplemented by a Filter, it is capable of working on a server.

Source Files

View all Source files

Directories

PathSynopsis
Package fault implements the Envoy Fault Injection HTTP filter.
Package fault implements the Envoy Fault Injection HTTP filter.
Package rbac implements the Envoy RBAC HTTP filter.
Package rbac implements the Envoy RBAC HTTP filter.
Package router implements the Envoy Router HTTP filter.
Package router implements the Envoy Router HTTP filter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp