-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.go
More file actions
25 lines (21 loc) · 830 Bytes
/
Copy pathconfig.go
File metadata and controls
25 lines (21 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package plugin
import (
plugin "github.com/hashicorp/go-plugin"
)
// <plugin type>-<plugin id/name>
// e.g. greeter-foo would be a plugin of type "greeter", with an id of "foo"
// handshakeConfigs are used to just do a basic handshake between
// a plugin and host. If the handshake fails, a user friendly error is shown.
// This prevents users from executing bad plugins or executing a plugin
// directory. It is a UX feature, not a security feature.
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "BASIC_PLUGIN",
MagicCookieValue: "hello",
}
// // PluginMap should be used by clients for the map of plugins.
// // This maps types of plugins to interface implementations.
// var PluginMap = map[string]plugin.Plugin{
// "foo": &GreeterPlugin{},
// "hello": &GreeterPlugin{},
// }