grpc

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Target           string
	DailOptions      []grpc.DialOption
	Timeout          time.Duration
	TLSVerify        bool
	IsTracingEnabled bool
	ServiceID        string
	Endpoint         *target.Endpoint
}

Options defines the configuration for a GRPC proxy instance.

type Proxy added in v0.10.0

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

Proxy implements a reverse proxy for gRPC services.

func New

func New(options Options) (*Proxy, error)

New creates a new GRPCProxy instance with the given options.

func (*Proxy) Close added in v0.10.0

func (p *Proxy) Close() error

Close closes the underlying gRPC client connection.

func (*Proxy) Endpoint added in v0.11.0

func (p *Proxy) Endpoint() *target.Endpoint

Endpoint returns the endpoint info associated with this proxy.

func (*Proxy) ID added in v0.10.0

func (p *Proxy) ID() string

ID return proxy's ID.

func (*Proxy) ServeHTTP added in v0.10.0

func (p *Proxy) ServeHTTP(ctx context.Context, c *app.RequestContext)

ServeHTTP implements the http.Handler interface.

func (*Proxy) SetEndpoint added in v0.11.0

func (p *Proxy) SetEndpoint(ep *target.Endpoint)

SetEndpoint updates the endpoint info associated with this proxy.

func (*Proxy) Target added in v0.10.0

func (p *Proxy) Target() string

Target returns the target URL of the upstream gRPC server.

Jump to

Keyboard shortcuts

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