Example #1
0
File: graph.go Project: 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,
	}
}
Example #2
0
// NewPluginManager returns a new plugin manager
func NewPluginManager() *PluginManager {
	pm := PluginManager{plugins: flux.NewCollector()}
	return &pm
}