[#255] services/audit: Implement task manager

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-22 03:26:36 +03:00 committed by Alex Vanin
parent 0f0be2377b
commit 580c9c974a
3 changed files with 138 additions and 0 deletions

View file

@ -0,0 +1,13 @@
package audittask
import (
"github.com/nspcc-dev/neofs-node/pkg/services/audit"
)
// PushTask adds a task to the queue for processing.
//
// Returns error if task was not added to the queue.
func (m *Manager) PushTask(t *audit.Task) error {
m.ch <- t
return nil
}