grpcproxy

package
v0.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Kind is the kind of Fallback.
	Kind = constant.HTTPGrpcProxyFilter
)

Variables

This section is empty.

Functions

func DescriptorSourceFromFileDescriptors

func DescriptorSourceFromFileDescriptors(files ...*desc.FileDescriptor) (*fileSource, error)

func Invoke

func Invoke(ctx context.Context, stub grpcdynamic.Stub, mthDesc *desc.MethodDescriptor, grpcReq proto.Message, opts ...grpc.CallOption) (proto.Message, error)

func RegisterExtension

func RegisterExtension(extReg *dynamic.ExtensionRegistry, msgDesc *desc.MessageDescriptor, registered map[string]bool) error

Types

type Config

type Config struct {
	Path  string  `yaml:"path" json:"path"`
	Rules []*Rule `yaml:"rules" json:"rules"` //nolint
}

Config describe the config of AccessFilter

type Filter

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

Filter is grpc filter instance

func (*Filter) Apply

func (f *Filter) Apply() error

func (*Filter) Config

func (f *Filter) Config() interface{}

func (*Filter) Handle

func (f *Filter) Handle(c *http.HttpContext)

Handle use the default http to grpc transcoding strategy https://cloud.google.com/endpoints/docs/grpc/transcoding

func (*Filter) PrepareFilterChain

func (f *Filter) PrepareFilterChain(ctx *http.HttpContext) error

type Match

type Match struct {
	Method string `yaml:"method" json:"method"` //nolint
}

type Plugin

type Plugin struct {
}

Plugin is grpc filter plugin.

func (*Plugin) CreateFilter

func (p *Plugin) CreateFilter() (filter.HttpFilter, error)

func (*Plugin) Kind

func (p *Plugin) Kind() string

type Rule

type Rule struct {
	Selector string `yaml:"selector" json:"selector"`
	Match    Match  `yaml:"match" json:"match"`
}

Jump to

Keyboard shortcuts

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