mirror of https://github.com/rocboss/paopao-ce
parent
3c14ced542
commit
0eda77775f
@ -1,29 +0,0 @@
|
|||||||
package app
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/rocboss/paopao-ce/internal/conf"
|
|
||||||
"github.com/rocboss/paopao-ce/internal/servants"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Service interface {
|
|
||||||
Start()
|
|
||||||
Stop()
|
|
||||||
Info() string
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewWebService() Service {
|
|
||||||
e := newWebEngine()
|
|
||||||
servants.RegisterWebServants(e)
|
|
||||||
|
|
||||||
return &webService{
|
|
||||||
server: &http.Server{
|
|
||||||
Addr: conf.ServerSetting.HttpIp + ":" + conf.ServerSetting.HttpPort,
|
|
||||||
Handler: e,
|
|
||||||
ReadTimeout: conf.ServerSetting.ReadTimeout,
|
|
||||||
WriteTimeout: conf.ServerSetting.WriteTimeout,
|
|
||||||
MaxHeaderBytes: 1 << 20,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
package app
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
Loading…
Reference in new issue