本文整理汇总了Golang中github.com/intelsdi-x/snap/control/plugin.NewPluginMeta函数的典型用法代码示例。如果您正苦于以下问题:Golang NewPluginMeta函数的具体用法?Golang NewPluginMeta怎么用?Golang NewPluginMeta使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewPluginMeta函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: main
func main() {
plugin.Start(
plugin.NewPluginMeta(dbi.Name, dbi.Version, dbi.Type, []string{}, []string{plugin.SnapGOBContentType}, plugin.ConcurrencyCount(1)),
dbi.New(),
os.Args[1],
)
}
示例2: main
// plugin bootstrap
func main() {
plugin.Start(
plugin.NewPluginMeta(osv.Name, osv.Version, osv.Type, []string{}, []string{plugin.SnapGOBContentType}),
&osv.Osv{}, // CollectorPlugin interface
os.Args[1],
)
}
示例3: main
// plugin bootstrap
func main() {
plugin.Start(
plugin.NewPluginMeta(libvirt.Name, libvirt.Version, libvirt.Type, []string{}, []string{plugin.SnapGOBContentType}),
&libvirt.Libvirt{}, // CollectorPlugin interface
os.Args[1],
)
}
示例4: main
// plugin bootstrap
func main() {
plugin.Start(
plugin.NewPluginMeta(name, version, pluginType, []string{}, []string{plugin.SnapGOBContentType}, plugin.ConcurrencyCount(1)),
ceph.New(),
os.Args[1],
)
}
示例5: Meta
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(
pluginName,
pluginVersion,
pluginType,
[]string{plugin.SnapGOBContentType},
[]string{plugin.SnapGOBContentType})
}
示例6: Meta
//Meta returns meta data for plugin
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(
pluginName,
version,
pluginType,
[]string{},
[]string{plugin.SnapGOBContentType},
plugin.ConcurrencyCount(1))
}
示例7: Meta
//TODO - USE Meta FUNCTION TO RETURN COLLECTOR METADATA INSTEAD OF EXPORTING VARIABLES TO MAIN PACKAGE
// Commenting exported items is very important
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(
name,
version,
plgtype,
[]string{plugin.SnapGOBContentType},
[]string{plugin.SnapGOBContentType},
)
}
示例8: Meta
//Meta returns meta data for testing
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(
Name,
Version,
Type,
[]string{plugin.SnapGOBContentType},
[]string{plugin.SnapGOBContentType},
plugin.CacheTTL(100*time.Millisecond),
)
}
示例9: Meta
// Commenting exported items is very important
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(
name,
version,
plgtype,
[]string{plugin.SnapGOBContentType},
[]string{plugin.SnapGOBContentType},
plugin.RoutingStrategy(plugin.StickyRouting),
)
}
示例10: main
// plugin bootstrap
func main() {
p, err := iostat.New()
if err != nil {
panic(err)
}
plugin.Start(
plugin.NewPluginMeta(iostat.Name, iostat.Version, iostat.Type, []string{}, []string{plugin.SnapGOBContentType}, plugin.ConcurrencyCount(1)),
p,
os.Args[1],
)
}
示例11: Meta
//Meta returns meta data for testing
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(
Name,
Version,
Type,
[]string{plugin.SnapGOBContentType},
[]string{plugin.SnapGOBContentType},
plugin.Unsecure(true),
plugin.ConcurrencyCount(1000),
)
}
示例12: Meta
// Meta returns a plugin meta data
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(
pluginName,
version,
pluginType,
[]string{plugin.SnapGOBContentType},
[]string{plugin.SnapGOBContentType},
plugin.RoutingStrategy(plugin.StickyRouting),
plugin.ConcurrencyCount(1),
)
}
示例13: Meta
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(
Name,
Version,
Type,
[]string{plugin.SnapGOBContentType},
[]string{plugin.SnapGOBContentType},
plugin.Unsecure(true),
plugin.RoutingStrategy(plugin.DefaultRouting),
)
}
示例14: main
// plugin bootstrap
func main() {
p, err := iostat.New()
if err != nil {
panic(err)
}
plugin.Start(
plugin.NewPluginMeta(
iostat.Name,
iostat.Version,
iostat.Type,
[]string{},
[]string{plugin.SnapGOBContentType},
plugin.Exclusive(true),
plugin.CacheTTL(1*time.Second),
),
p,
os.Args[1],
)
}
示例15: main
func main() {
dockerPlg, err := docker.New()
if err != nil {
panic(err)
}
plugin.Start(
plugin.NewPluginMeta(
docker.NS_PLUGIN,
docker.VERSION,
plugin.CollectorPluginType,
[]string{},
[]string{plugin.SnapGOBContentType},
plugin.ConcurrencyCount(1)),
dockerPlg,
os.Args[1],
)
}