mirror of
https://github.com/ICKelin/opennotr.git
synced 2025-09-26 20:01:13 +08:00
26 lines
534 B
Go
26 lines
534 B
Go
package dummy
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/ICKelin/opennotr/internal/logs"
|
|
"github.com/ICKelin/opennotr/opennotrd/plugin"
|
|
)
|
|
|
|
func init() {
|
|
plugin.Register("dummy", &DummyPlugin{})
|
|
}
|
|
|
|
type DummyPlugin struct{}
|
|
|
|
func (d *DummyPlugin) Setup(cfg json.RawMessage) error {
|
|
return nil
|
|
}
|
|
|
|
func (d *DummyPlugin) RunProxy(meta *plugin.PluginMeta) (*plugin.ProxyTuple, error) {
|
|
logs.Info("dummy plugin client config: %v", meta.Ctx)
|
|
return &plugin.ProxyTuple{}, nil
|
|
}
|
|
|
|
func (d *DummyPlugin) StopProxy(meta *plugin.PluginMeta) {}
|