grpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 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 GRPCProxy

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

func New

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

func (*GRPCProxy) AddFailedCount

func (p *GRPCProxy) AddFailedCount(count uint) error

func (*GRPCProxy) Close

func (p *GRPCProxy) Close() error

func (*GRPCProxy) ID

func (p *GRPCProxy) ID() string

ID return proxy's ID

func (*GRPCProxy) IsAvailable

func (p *GRPCProxy) IsAvailable() bool

func (*GRPCProxy) ServeHTTP

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

ServeHTTP implements the http.Handler interface

func (*GRPCProxy) Tag added in v0.6.0

func (p *GRPCProxy) Tag(key string) (value string, exist bool)

func (*GRPCProxy) Target

func (p *GRPCProxy) Target() string

func (*GRPCProxy) Weight

func (p *GRPCProxy) Weight() uint32

type Options

type Options struct {
	Target           string
	DailOptions      []grpc.DialOption
	Weight           uint32
	MaxFails         uint
	Timeout          time.Duration
	FailTimeout      time.Duration
	TLSVerify        bool
	Tags             map[string]string
	IsTracingEnabled bool
	ServiceID        string
}

Jump to

Keyboard shortcuts

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