proxy

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DescriptorSourceFromFileDescriptorSet

func DescriptorSourceFromFileDescriptorSet(files *descriptorpb.FileDescriptorSet) (grpcproxy.DescriptorSource, error)

DescriptorSourceFromFileDescriptorSet creates a DescriptorSource that is backed by the FileDescriptorSet.

func DescriptorSourceFromProtoset

func DescriptorSourceFromProtoset(filenames []string) (grpcproxy.DescriptorSource, error)

DescriptorSourceFromProtoset creates a DescriptorSource that is backed by the named files, whose contents are Protocol Buffer source files. The given importPaths are used to locate any imported files.

func InitProtosetSource

func InitProtosetSource(protoset []string)

Types

type MethodInvocation

type MethodInvocation struct {
	*desc.MethodDescriptor
	*dynamic.Message
}

MethodInvocation contains a method and a message used to invoke an RPC

type Proxy

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

func NewProxy

func NewProxy() *Proxy

NewProxy creates a new client

func (*Proxy) Call

func (p *Proxy) Call(ctx context.Context, serviceName, methodName string, message []byte, md *metadata.MD) ([]byte, error)

Call performs the gRPC call after doing reflection to obtain type information.

func (*Proxy) Connect

func (p *Proxy) Connect(ctx context.Context, target *url.URL) error

Connect opens a connection to target.

type Reflector

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

func NewReflector

func NewReflector(client *grpcreflect.Client) *Reflector

NewReflector creates a new Reflector from the reflection client

func (*Reflector) CreateInvocation

func (r *Reflector) CreateInvocation(ctx context.Context, serviceName, methodName string, input []byte) (*MethodInvocation, error)

CreateInvocation creates a MethodInvocation by performing reflection

Jump to

Keyboard shortcuts

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