task

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, filter *sfTY.ServiceFilter, variablesEngine types.VariablesEngine) (serviceTY.Service, error)

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func (*Store) Add

func (s *Store) Add(task taskTY.Config, schedule func(scheduleType, interval string, task *taskTY.Config) string)

Add a task

func (*Store) Get

func (s *Store) Get(id string) taskTY.Config

GetByID returns handler by id

func (*Store) ListIDs

func (s *Store) ListIDs() []string

func (*Store) Remove

func (s *Store) Remove(taskID string, unscheduleAll func(scheduleID string), getScheduleId func(IDs ...string) string)

Remove a task

func (*Store) RemoveAll

func (s *Store) RemoveAll()

func (*Store) UpdateState

func (s *Store) UpdateState(id string, state *taskTY.State)

UpdateState of a task

type TaskService

type TaskService struct {
	// contains filtered or unexported fields
}

func (*TaskService) Close

func (svc *TaskService) Close() error

Close the service listener

func (*TaskService) Name

func (svc *TaskService) Name() string

func (*TaskService) Start

func (svc *TaskService) Start() error

Start task service listener

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL