go_dreamfactory/services/s_comps/comp_gateroute.go
2022-05-30 19:03:11 +08:00

37 lines
936 B
Go

package s_comps
import (
"fmt"
"github.com/liwei1dao/lego/base"
"github.com/liwei1dao/lego/core"
"github.com/liwei1dao/lego/core/cbase"
)
type SComp_GateRouteComp struct {
cbase.ServiceCompBase
Service base.IRPCXService
}
func (this *SComp_GateRouteComp) Init(service core.IService, comp core.IServiceComp, options core.ICompOptions) (err error) {
if s, ok := service.(base.IRPCXService); !ok {
return fmt.Errorf("SC_GateRouteComp Init service is no IRPCXService")
} else {
this.Service = s
}
err = this.ServiceCompBase.Init(service, comp, options)
return err
}
func (this *SComp_GateRouteComp) Start() (err error) {
err = this.ServiceCompBase.Start()
// this.Service.RegisterFunctionName(string(comm.Rpc_GateRoute), this.ReceiveMsg) //注册网关路由接收接口
return
}
// func (this *SComp_GateRouteComp) ReceiveMsg(ctx context.Context, args comm.IUserMessage, reply *Reply) error {
// return nil
// }