grpcgateway

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

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

func NewGateway

func NewGateway(log *zap.Logger, opts ...GatewayOption) *Gateway

func (*Gateway) ConnectAndRegister

func (g *Gateway) ConnectAndRegister(addr string) error

func (*Gateway) Handler

func (g *Gateway) Handler() http.Handler

type GatewayOption

type GatewayOption func(*Gateway)

func WithRegistrableServices

func WithRegistrableServices(basePath string, services ...RegistrableService) GatewayOption

type RegistrableService

type RegistrableService interface {
	RegisterGateway(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
}

RegistrableService describes a service implementation that can be registered in the gRPC-Gateway server. gRPC service server implementations must implement this interface in order to be registered in gRPC-Gateway.

Jump to

Keyboard shortcuts

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