server

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(path string) *rumRouter

NewRouter 创建路由组

Types

type HandlerFunc

type HandlerFunc = gin.HandlerFunc

type RumServer added in v0.5.7

type RumServer struct {
	Listen string `env:""`
	// contains filtered or unexported fields
}

RumServer 定义 rum server

func Default

func Default() *RumServer

func New

func New() *RumServer

func (*RumServer) AddRouter added in v0.5.7

func (rs *RumServer) AddRouter(routers ...*rumRouter)

AddRouter 添加子路由

func (*RumServer) Context added in v0.5.7

func (rs *RumServer) Context() context.Context

Context 获取 context

func (*RumServer) Handle added in v0.5.7

func (rs *RumServer) Handle(handlers ...operator.Operator)

Handle 添加业务逻辑

func (*RumServer) Initialize added in v0.5.7

func (rs *RumServer) Initialize()

func (*RumServer) Run added in v0.5.7

func (rs *RumServer) Run(addr ...string) error

Run 启动服务

func (*RumServer) SetDefaults added in v0.5.7

func (rs *RumServer) SetDefaults()

func (*RumServer) Use added in v0.5.7

func (rs *RumServer) Use(handlers ...HandlerFunc)

Use 注册中间件

func (*RumServer) WithContext added in v0.5.7

func (rs *RumServer) WithContext(ctx context.Context)

WithContext 设置 context

Jump to

Keyboard shortcuts

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