Documentation
¶
Index ¶
- Constants
- Variables
- func MsgPackDecode(buf []byte, out interface{}) error
- func MsgPackEncode(b *[]byte, in interface{}) error
- type AgentConfig
- type BasePlugin
- type BasePluginClient
- type ClientDriverConfig
- type Config
- type ConfigSchemaFn
- type MockPlugin
- type PluginBase
- type PluginInfoFn
- type PluginInfoResponse
- type SetConfigFn
- type TestConfig
Constants ¶
View Source
const ( // PluginTypeBase implements the base plugin interface PluginTypeBase = "base" // PluginTypeDriver implements the driver plugin interface PluginTypeDriver = "driver" // PluginTypeDevice implements the device plugin interface PluginTypeDevice = "device" )
Variables ¶
View Source
var ( // Handshake is a common handshake that is shared by all plugins and Nomad. Handshake = plugin.HandshakeConfig{ ProtocolVersion: 2, MagicCookieKey: "NOMAD_PLUGIN_MAGIC_COOKIE", MagicCookieValue: "e4327c2e01eabfd75a8a67adb114fb34a757d57eee7728d857a8cec6e91a7255", } )
View Source
var MsgpackHandle = func() *codec.MsgpackHandle { h := &codec.MsgpackHandle{} h.RawToString = true h.MapType = reflect.TypeOf(map[string]interface{}(nil)) return h }()
MsgpackHandle is a shared handle for encoding/decoding of structs
View Source
var ( // TestSpec is an hcl Spec for testing TestSpec = &hclspec.Spec{ Block: &hclspec.Spec_Object{ Object: &hclspec.Object{ Attributes: map[string]*hclspec.Spec{ "foo": { Block: &hclspec.Spec_Attr{ Attr: &hclspec.Attr{ Type: "string", Required: false, }, }, }, "bar": { Block: &hclspec.Spec_Attr{ Attr: &hclspec.Attr{ Type: "number", Required: false, }, }, }, "baz": { Block: &hclspec.Spec_Attr{ Attr: &hclspec.Attr{ Type: "bool", }, }, }, }, }, }, } )
Functions ¶
func MsgPackDecode ¶
MsgPackDecode is used to decode a MsgPack encoded object
func MsgPackEncode ¶
func MsgPackEncode(b *[]