server支持自定义配置

This commit is contained in:
2021-04-17 21:41:40 +08:00
parent 70007b036d
commit 563c334757
7 changed files with 88 additions and 16 deletions

View File

@ -10,6 +10,9 @@ package main
import (
"fmt"
"github.com/go-developer/gopkg/logger"
"go.uber.org/zap/zapcore"
"github.com/go-developer/websocket/config"
"github.com/go-developer/websocket/message"
@ -59,6 +62,12 @@ func (e Example) GetServerPort() int {
return 10099
}
func (e Example) GetWSServerConfig() []config.SetWSServerConfig {
return []config.SetWSServerConfig{
config.SetWSServerLogEnable("./logs", e.GetModuleFlag()+".log", zapcore.DebugLevel, logger.TimeIntervalTypeHour),
}
}
type exampleCommand struct {
}