go_dreamfactory/modules/gate/module.go
2022-05-30 19:03:11 +08:00

41 lines
788 B
Go

package gate
import (
"go_dreamfactory/comm"
"go_dreamfactory/modules"
"github.com/liwei1dao/lego/core"
"github.com/liwei1dao/lego/sys/log"
)
func NewModule() core.IModule {
m := new(Gate)
return m
}
type Gate struct {
modules.ModuleBase
options *Options
}
func (this *Gate) GetType() core.M_Modules {
return comm.SM_GateModule
}
func (this *Gate) NewOptions() (options core.IModuleOptions) {
return new(Options)
}
func (this *Gate) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
this.options = options.(*Options)
log.Debugf("Module.Gate Init")
return
}
func (this *Gate) Start() (err error) {
err = this.ModuleBase.Start()
log.Debugf("Module.Gate Start")
return
}