Documentation ¶
Index ¶
- func NewServerSession(app module.App, name string, node *registry.Node) (module.ServerSession, error)
- type DefaultModule
- type Module
- func (m *Module) Call(ctx context.Context, serviceName string, ...) error
- func (m *Module) GetApp() module.App
- func (m *Module) GetClient(serviceName string) (error, *grpc.ClientConn)
- func (m *Module) GetServer() server.Server
- func (m *Module) GetServerID() string
- func (m *Module) OnDestroy()
- func (m *Module) OnInit(subclass module.RPCModule, app module.App, opt ...server.Option)
- type ModuleManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServerSession ¶
func NewServerSession(app module.App, name string, node *registry.Node) (module.ServerSession, error)
NewServerSession 创建一个节点实例
Types ¶
type DefaultModule ¶
type DefaultModule struct {
// contains filtered or unexported fields
}
DefaultModule 模块结构
type ModuleManager ¶
type ModuleManager struct {
// contains filtered or unexported fields
}
ModuleManager 模块管理器
func (*ModuleManager) Register ¶
func (mer *ModuleManager) Register(mi module.Module, logger *glog.Logger)
Register 注册模块
func (*ModuleManager) RegisterRunMod ¶
func (mer *ModuleManager) RegisterRunMod(mi module.Module)
RegisterRunMod 注册需要运行的模块
Click to show internal directories.
Click to hide internal directories.