Documentation
¶
Index ¶
- Variables
- type Group
- func (T *Group) Close() error
- func (T *Group) GetServer(laddr string) (*Server, bool)
- func (T *Group) LoadConfigFile(p string) (ok bool, err error)
- func (T *Group) SetServer(laddr string, srv *Server) error
- func (T *Group) SetSessionExpiryInterval(d time.Duration)
- func (T *Group) SiteMan() *vweb.SiteMan
- func (T *Group) Start() error
- func (T *Group) UpdateConfig(conf *config.Config) error
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ServerContextKey = &contextKey{"Server"}
View Source
var Version string = "Server/v3"
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
ErrorLog *log.Logger // 错误日志文件
Module func(name string) (vweb.DynamicTemplater, error) // 支持更动态文件类型
CertManager *autocert.Manager // 自动申请证书 Let's Encrypt
// contains filtered or unexported fields
}
func (*Group) GetServer ¶
GetServer 读取一个服务器
laddr string 监听地址 *Server 服务器 bool 如果存在服务器, 返回true。否则返回false
func (*Group) LoadConfigFile ¶
LoadConfigFile 挂载本地配置文件。
p string 文件路径 ok bool true配置文件被修改过, false没有变动 err error 错误
func (*Group) SetSessionExpiryInterval ¶
SetSessionExpiryInterval 设置session的过期时间, 随配置文件变动, d 原来的保存内容可能会被删除或增加。
Click to show internal directories.
Click to hide internal directories.