grpc_gw

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeout = time.Second * 2

Variables

This section is empty.

Functions

func Register added in v0.1.0

func Register(ctx context.Context, mux *gw.ServeMux, conn *grpc.ClientConn) (err error)

Types

type Builder

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

func New

func New(name string) Builder

func (*Builder) Build

func (t *Builder) Build(cfg *Cfg, opts ...gw.ServeMuxOption) error

func (*Builder) Get

func (t *Builder) Get() *http.Server

func (*Builder) Register added in v0.1.0

func (t *Builder) Register(conn *grpc.ClientConn) (err error)

type Cfg

type Cfg struct {
	Timeout time.Duration `json:"timeout"`
}

func GetDefaultCfg

func GetDefaultCfg() *Cfg

type ServeMux

type ServeMux = gw.ServeMux

Jump to

Keyboard shortcuts

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