jobmgr

package
v0.58.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dyncfg

type Dyncfg interface {
	Register(cfg confgroup.Config)
	Unregister(cfg confgroup.Config)
	UpdateStatus(cfg confgroup.Config, status, payload string)
}

type FileLocker

type FileLocker interface {
	Lock(name string) (bool, error)
	Unlock(name string) error
}

type Job

type Job interface {
	Name() string
	ModuleName() string
	FullName() string
	AutoDetection() bool
	AutoDetectionEvery() int
	RetryAutoDetection() bool
	Tick(clock int)
	Start()
	Stop()
	Cleanup()
}

type Manager

type Manager struct {
	*logger.Logger

	PluginName string
	Out        io.Writer
	Modules    module.Registry

	FileLock    FileLocker
	StatusSaver StatusSaver
	StatusStore StatusStore
	Vnodes      Vnodes
	Dyncfg      Dyncfg
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *Manager

func (*Manager) Run

func (m *Manager) Run(ctx context.Context, in chan []*confgroup.Group)

type StatusSaver

type StatusSaver interface {
	Save(cfg confgroup.Config, state string)
	Remove(cfg confgroup.Config)
}

type StatusStore

type StatusStore interface {
	Contains(cfg confgroup.Config, states ...string) bool
}

type Vnodes

type Vnodes interface {
	Lookup(key string) (*vnodes.VirtualNode, bool)
}

Jump to

Keyboard shortcuts

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