MCPcopy Create free account
hub / github.com/Monibuca/engine / run

Method run

plugin.go:127–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127func (opt *Plugin) run() {
128 opt.Context, opt.CancelFunc = context.WithCancel(Engine)
129 opt.Config.OnEvent(FirstConfig(&opt.RawConfig))
130 opt.Debug("config", zap.Any("config", opt.Config))
131 if conf, ok := opt.Config.(config.HTTPConfig); ok {
132 go conf.Listen(opt)
133 }
134 if conf, ok := opt.Config.(config.TCPConfig); ok {
135 go conf.ListenTCP(opt, opt.Config.(config.TCPPlugin))
136 }
137}
138
139// Update 热更新配置
140func (opt *Plugin) Update(conf *config.Config) {

Callers 1

assignMethod · 0.95

Calls 5

FirstConfigTypeAlias · 0.85
OnEventMethod · 0.65
DebugMethod · 0.65
ListenMethod · 0.65
ListenTCPMethod · 0.65

Tested by

no test coverage detected