rules/manager.go
func NewManager(o *ManagerOptions) *Manager {
	if o.Metrics == nil {
		o.Metrics = NewGroupMetrics(o.Registerer)
	}

	m := &Manager{
		groups: map[string]*Group{},
		opts:   o,
		block:  make(chan struct{}),
		logger: o.Logger,
	}

	if o.Registerer != nil {
		o.Registerer.MustRegister(m)
	}

	o.Metrics.iterationsMissed.Inc()
	return m
}
func NewManager(o *ManagerOptions) *Manager {
	if o.Metrics == nil {
		o.Metrics = NewGroupMetrics(o.Registerer)
	}

	m := &Manager{
		groups: map[string]*Group{},
		opts:   o,
		block:  make(chan struct{}),
		logger: o.Logger,
	}

	if o.Registerer != nil {
		o.Registerer.MustRegister(m)
	}

	o.Metrics.iterationsMissed.Inc()
	return m
}
func NewManager ( o * ManagerOptions ) * Manager { if o . Metrics == nil { o . Metrics = NewGroupMetrics ( o . Registerer ) } m := & Manager { groups : map [ string ] * Group { } , opts : o , block : make ( chan struct { } ) , logger : o . Logger , } if o . Registerer != nil { o . Registerer . MustRegister ( m ) } o . Metrics . iterationsMissed . Inc ( ) return m }
// NewManager returns an implementation of Manager, ready to be started
// by calling the Run method.
NewManager returns an implementation of Manager ready to be started by calling the Run method .