Documentation
¶
Index ¶
- type Options
- type Proxy
- func (p *Proxy) AddFailedCount(count uint) error
- func (p *Proxy) Close() error
- func (p *Proxy) ID() string
- func (p *Proxy) IsAvailable() bool
- func (p *Proxy) ServeHTTP(ctx context.Context, c *app.RequestContext)
- func (p *Proxy) Tag(key string) (value string, exist bool)
- func (p *Proxy) Tags() map[string]string
- func (p *Proxy) Target() string
- func (p *Proxy) Weight() uint32
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
Weight uint32
MaxFails uint
Timeout time.Duration
FailTimeout time.Duration
TLSVerify bool
Tags map[string]string
IsTracingEnabled bool
ServiceID string
}
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 (*Proxy) AddFailedCount ¶ added in v0.10.0
AddFailedCount increments the failed request count for the upstream server.
func (*Proxy) IsAvailable ¶ added in v0.10.0
IsAvailable returns true if the upstream gRPC server is considered healthy.
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) Tag ¶ added in v0.10.0
Tag retrieves a specific metadata tag value from the proxy instance.
Click to show internal directories.
Click to hide internal directories.