Example #1
0
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])
}
Example #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])
}