go_dreamfactory/modules/gate/module.go
2022-05-27 17:27:01 +08:00

36 lines
726 B
Go

package gate
import (
"go_dreamfactory/comm"
"github.com/liwei1dao/lego/base"
"github.com/liwei1dao/lego/core"
"github.com/liwei1dao/lego/core/cbase"
)
func NewModule() core.IModule {
m := new(Gate)
return m
}
type Gate struct {
cbase.ModuleBase
options *Options
service base.IClusterService
}
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.service = service.(base.IClusterService)
this.options = options.(*Options)
return
}