INNER CODE UNIT · Go
New
keel-hq/keel · approvals/approvals.go:88
func New(opts *Opts) *DefaultManager {
man := &DefaultManager{
// cache: opts.Cache,
store: opts.Store,
channels: make(map[uint32]chan *types.Approval),
approvedCh: make(map[uint32]chan *types.Approval),
index: 0,
mu: &sync.Mutex{},
subMu: &sync.RWMutex{},
}
return man
}
// StartExpiryService - starts approval expiry service which deletes approvals
// that already reached their deadline
func (m *DefaultManager) StartExpiryService(ctx context.Context) error {
ticker := time.NewTicker(60 * time.Minute)