示例#1
0
文件: main.go 项目: callidetech/snap
func main() {
	// Provided:
	//   the definition of the plugin metadata
	//   the implementation satisfying plugin.CollectorPlugin

	// Define metadata about Plugin
	meta := mock.Meta()
	meta.RPCType = plugin.JSONRPC

	// Start a collector
	plugin.Start(meta, new(mock.Mock), os.Args[1])
}
示例#2
0
func main() {
	// Provided:
	//   the definition of the plugin metadata
	//   the implementation satfiying plugin.CollectorPlugin

	// Define metadata about Plugin
	meta := mock.Meta()
	meta.RPCType = plugin.JSONRPC
	meta.CacheTTL = time.Duration(time.Millisecond * 100)

	// Start a collector
	plugin.Start(meta, new(mock.Mock), os.Args[1])
}