functional

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Root triggers modules without dependencies
	Root = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Name         string
	Description  string
	Dependencies []string
	IsReloadAll  bool
	DoStartup    bool
	Labels       map[string]string
}

Request describes a module and run task options

type Scheduler

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

Scheduler is used to process functional modules, it waits until modules` dependencies are processed and then runs ModuleRun tasks for them in parallel queues

func NewScheduler

func NewScheduler(ctx context.Context, qService queueService, logger *log.Logger) *Scheduler

NewScheduler creates a scheduler instance and starts it

func (*Scheduler) Add

func (s *Scheduler) Add(reqs ...*Request)

Add adds requests to process

func (*Scheduler) Done

func (s *Scheduler) Done(name string)

Done sends signal that module processing done

func (*Scheduler) Finished

func (s *Scheduler) Finished() bool

Finished defines if processing done

func (*Scheduler) Remove

func (s *Scheduler) Remove(name string)

Remove removes module from done TODO(ipaqsa): stop module run task

Jump to

Keyboard shortcuts

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