grpcgateway

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyGRPCGatewayOption

type EmptyGRPCGatewayOption struct{}

EmptyGRPCGatewayOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

type GRPCGateway

type GRPCGateway struct {
	http.Server
	// contains filtered or unexported fields
}

func NewGRPCGateWay

func NewGRPCGateWay(addr string, options ...GRPCGatewayOption) *GRPCGateway

func (*GRPCGateway) ApplyOptions

func (o *GRPCGateway) ApplyOptions(options ...GRPCGatewayOption) *GRPCGateway

func (*GRPCGateway) ListenAndServe

func (g *GRPCGateway) ListenAndServe() error

func (*GRPCGateway) RegisterGRPCHandler

func (g *GRPCGateway) RegisterGRPCHandler(h func(srv *grpc.Server))

func (*GRPCGateway) RegisterHTTPHandler

func (g *GRPCGateway) RegisterHTTPHandler(ctx context.Context,
	h func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error,
) error

type GRPCGatewayOption

type GRPCGatewayOption interface {
	// contains filtered or unexported methods
}

A GRPCGatewayOption sets options.

func WithClientDialOptions

func WithClientDialOptions(opts []grpc.DialOption) GRPCGatewayOption

func WithServerOptions

func WithServerOptions(opts []grpc.ServerOption) GRPCGatewayOption

type GRPCGatewayOptionFunc

type GRPCGatewayOptionFunc func(*GRPCGateway)

GRPCGatewayOptionFunc wraps a function that modifies Client into an implementation of the GRPCGatewayOption interface.

type GRPCHandler

type GRPCHandler interface {
	Register(srv *grpc.Server)
}

type GRPCHandlerFunc

type GRPCHandlerFunc func(srv *grpc.Server)

func (GRPCHandlerFunc) Register

func (h GRPCHandlerFunc) Register(srv *grpc.Server)

type HTTPHandler

type HTTPHandler interface {
	Register(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error
}

type HTTPHandlerFunc

type HTTPHandlerFunc func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error

func (HTTPHandlerFunc) Register

func (h HTTPHandlerFunc) Register(
	ctx context.Context,
	mux *runtime.ServeMux,
	endpoint string,
	opts []grpc.DialOption,
) error

Directories

Path Synopsis
Package date is a reverse proxy.
Package date is a reverse proxy.

Jump to

Keyboard shortcuts

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