Documentation ¶
Index ¶
- Variables
- type ActionsInterface
- type Manager
- func (m *Manager) AddOptionalTask(ctx context.Context, reqStorage logical.Storage, ...) (string, bool, error)
- func (m *Manager) AddTask(ctx context.Context, reqStorage logical.Storage, ...) (string, error)
- func (m *Manager) Paths() []*framework.Path
- func (m *Manager) PeriodicFunc(ctx context.Context, req *logical.Request) error
- func (m *Manager) RunTask(ctx context.Context, reqStorage logical.Storage, ...) (string, error)
- func (m *Manager) TaskFailedCallback(ctx context.Context, uuid string, log []byte, taskErr error)
- func (m *Manager) TaskStartedCallback(ctx context.Context, uuid string)
- func (m *Manager) TaskSucceededCallback(ctx context.Context, uuid string, log []byte)
- func (m *Manager) WrapTaskFunc(taskFunc func(context.Context, logical.Storage) error, ...) func(ctx context.Context) error
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBusy = errors.New("busy") ErrContextCanceled = errors.New("context canceled") )
Functions ¶
This section is empty.
Types ¶
type ActionsInterface ¶
type ActionsInterface interface { // RunTask runs task or returns busy error RunTask(ctx context.Context, reqStorage logical.Storage, taskFunc func(ctx context.Context, storage logical.Storage) error) (string, error) // AddTask adds task to queue AddTask(ctx context.Context, reqStorage logical.Storage, taskFunc func(ctx context.Context, storage logical.Storage) error) (string, error) // AddOptionalTask adds task to queue if empty AddOptionalTask(ctx context.Context, reqStorage logical.Storage, taskFunc func(ctx context.Context, storage logical.Storage) error) (string, bool, error) }
type Manager ¶
type Manager struct { Storage logical.Storage Worker worker.Interface // contains filtered or unexported fields }
func NewManager ¶
func NewManager(logger hclog.Logger) *Manager
func (*Manager) AddOptionalTask ¶
func (*Manager) PeriodicFunc ¶
func (*Manager) TaskFailedCallback ¶
func (*Manager) TaskStartedCallback ¶
func (*Manager) TaskSucceededCallback ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.