34 lines
634 B
Go
34 lines
634 B
Go
|
package fasthttp
|
||
|
|
||
|
import (
|
||
|
"git.loafle.net/commons/server-go"
|
||
|
"git.loafle.net/commons/server-go/web"
|
||
|
"github.com/valyala/fasthttp"
|
||
|
)
|
||
|
|
||
|
type Servlet interface {
|
||
|
web.Servlet
|
||
|
|
||
|
Handle(servletCtx server.ServletCtx, ctx *fasthttp.RequestCtx)
|
||
|
}
|
||
|
|
||
|
type Servlets struct {
|
||
|
Servlet
|
||
|
}
|
||
|
|
||
|
func (s *Servlets) ServletCtx(serverCtx server.ServerCtx) server.ServletCtx {
|
||
|
return server.NewServletContext(nil, serverCtx)
|
||
|
}
|
||
|
|
||
|
func (s *Servlets) Init(serverCtx server.ServerCtx) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (s *Servlets) Destroy(serverCtx server.ServerCtx) {
|
||
|
//
|
||
|
}
|
||
|
|
||
|
func (s *Servlets) Handle(servletCtx server.ServletCtx, ctx *fasthttp.RequestCtx) {
|
||
|
|
||
|
}
|