routers

package
v4.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	Routers []Router
}

func (*Factory) Handle

func (r *Factory) Handle(context context.Context, server *http.ServeMux, client *grpc.ClientConn) *http.ServeMux

func (*Factory) Sort

func (r *Factory) Sort()

type GRpcGateway

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

func (*GRpcGateway) Handle

func (g *GRpcGateway) Handle(ctx context.Context, server *runtime.ServeMux, client *grpc.ClientConn)

func (*GRpcGateway) Priority

func (a *GRpcGateway) Priority() int

func (*GRpcGateway) Register

func (g *GRpcGateway) Register(servers []configs.Server)

type MuxRouter

type MuxRouter struct {
	Debug bool
	// contains filtered or unexported fields
}

func (*MuxRouter) Add

func (m *MuxRouter) Add(route routes.Route)

func (*MuxRouter) Handle

func (m *MuxRouter) Handle(context context.Context, server *runtime.ServeMux, client *grpc.ClientConn)

func (*MuxRouter) Priority

func (m *MuxRouter) Priority() int

func (*MuxRouter) Register

func (m *MuxRouter) Register(muxs []routes.Route)

type Router

type Router interface {
	Handle(context context.Context, server *runtime.ServeMux, client *grpc.ClientConn)
	Priority() int
}

Jump to

Keyboard shortcuts

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