Files
apinto/http-router/config.go
黄孟柱 a10d4b53a0 init
2021-07-20 11:11:39 +08:00

31 lines
494 B
Go

package http_router
import "net/http"
type Config struct {
name string
port int
Rules []RouterRule
host []string
service http.Handler
}
type RouterRule struct {
location string
header map[string]string
query map[string]string
}
type RouterWork struct {
Service http.Handler
Config Config
}
//func (r *RouterWork) Start() error {
// routerManager.Add(r.Config, r.Service)
//}
//
//func (r *RouterWork) Stop() error {
// routerManager.Del(r.Config, r.Service)
//}