server支持自定义配置
This commit is contained in:
@ -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 {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user