示例#1
0
文件: graph.go 项目: influx6/ds
//NewSocket creates a new socket between two nodes with a set weight
func NewSocket(from, to Nodes, weight int) *Socket {
	return &Socket{
		Collector: flux.NewCollector(),
		Attrs:     NewStringSet(),
		To:        to,
		From:      from,
		Weight:    weight,
	}
}
示例#2
0
文件: plugins.go 项目: influx6/relay
// NewPluginManager returns a new plugin manager
func NewPluginManager() *PluginManager {
	pm := PluginManager{plugins: flux.NewCollector()}
	return &pm
}