grpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 29 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) Target

func (p *GRPCProxy) Target() string

func (*GRPCProxy) Weight

func (p *GRPCProxy) Weight() uint32

type Options

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

Jump to

Keyboard shortcuts

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