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