Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Proxy)
Option for grpcproxy.Proxy.
func WithBackend ¶
func WithBackend(backend string, conn *grpc.ClientConn) Option
WithBackends adds microservice to proxy to.
type Proxy ¶
Proxy is a HTTP Handler to invoke a GRPC microservice with GRPC UI enabled. The basic usage is like: conn, _ := service.DialGRPC("service") proxy := NewProxy(
grpcproxy.WithBackend("service", conn),
) http.Handle("/api", http.StripPrefix(proxy, "/api"))
func (*Proxy) SetBackend ¶
func (p *Proxy) SetBackend(backend string, conn *grpc.ClientConn)
Click to show internal directories.
Click to hide internal directories.