HandshakeConfig MagicCookieKey key定死

This commit is contained in:
李子铭 2024-08-08 09:32:49 +08:00
parent 622a368a25
commit ff0ff17055
3 changed files with 6 additions and 9 deletions

View File

@ -11,7 +11,6 @@ func Order(ctx context.Context, tag string, request *proto.OrderRequest) (*proto
if err != nil {
return nil, err
}
//request.Config = srv.Config
return srv.Impl.Order(ctx, request)
}

View File

@ -6,9 +6,8 @@ import (
)
type PluginInfo struct {
Tag string
Impl shared.PluginService
//Config json.RawMessage
Tag string
Impl shared.PluginService
cleanup func()
}
@ -33,9 +32,8 @@ func (m *pluginManage) add(c *Config) error {
return err
}
m.plugins[c.Tag] = &PluginInfo{
Tag: c.Tag,
Impl: impl,
//Config: c.Config,
Tag: c.Tag,
Impl: impl,
cleanup: cleanup,
}
return nil

View File

@ -21,10 +21,10 @@ func PluginSet(opts ...*Plugin) plugin.PluginSet {
return plugins
}
func HandshakeConfig(version uint, key, value string) plugin.HandshakeConfig {
func HandshakeConfig(version uint, value string) plugin.HandshakeConfig {
return plugin.HandshakeConfig{
ProtocolVersion: version,
MagicCookieKey: key,
MagicCookieKey: "BASIC_PLUGIN",
MagicCookieValue: value,
}
}