httpgatebase

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(opts httpgate.Options) http.Handler

NewHandler 创建网关

func RequestToProto

func RequestToProto(r *http.Request) (*httpgate.Request, error)

Types

type HttpGateBase

type HttpGateBase struct {
	module.ModuleBase
	// contains filtered or unexported fields
}

func (*HttpGateBase) GetType

func (this *HttpGateBase) GetType() string

func (*HttpGateBase) Init

func (this *HttpGateBase) Init(subclass app.IRPCModule, settings *conf.ModuleSettings, opts ...httpgate.Option)

func (*HttpGateBase) OnDestroy

func (this *HttpGateBase) OnDestroy()

func (*HttpGateBase) Run

func (this *HttpGateBase) Run(closeSig chan bool)

func (*HttpGateBase) Version

func (this *HttpGateBase) Version() string

type HttpHandler

type HttpHandler struct {
	Opts httpgate.Options
}

HttpHandler 网关handler

func (*HttpHandler) ServeHTTP

func (a *HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

API handler is the default handler which takes api.Request and returns api.Response

Jump to

Keyboard shortcuts

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