scheduler

package
v0.0.2-0...-4ce78c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

package scheduler

This package is providing the Scheduler interface that should be implemented for any scheduler that would want to plug in autodiscovery. It also define the MetaScheduler which dispatchs all instructions from autodiscovery to all the registered schedulers.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaScheduler

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

MetaScheduler is a scheduler dispatching to all its registered schedulers

func NewMetaScheduler

func NewMetaScheduler() *MetaScheduler

NewMetaScheduler inits a meta scheduler

func (*MetaScheduler) Deregister

func (ms *MetaScheduler) Deregister(name string)

Deregister a scheduler in the meta scheduler to dispatch to

func (*MetaScheduler) Register

func (ms *MetaScheduler) Register(name string, s Scheduler)

Register a scheduler in the meta scheduler to dispatch to

func (*MetaScheduler) Schedule

func (ms *MetaScheduler) Schedule(configs []integration.Config)

Schedule schedules configs to all registered schedulers

func (*MetaScheduler) Stop

func (ms *MetaScheduler) Stop()

Stop handles clean stop of registered schedulers

func (*MetaScheduler) Unschedule

func (ms *MetaScheduler) Unschedule(configs []integration.Config)

Unschedule unschedules configs to all registered schedulers

type Scheduler

type Scheduler interface {
	Schedule([]integration.Config)
	Unschedule([]integration.Config)
	Stop()
}

Scheduler is the interface that should be implemented if you want to schedule and unschedule integrations

Jump to

Keyboard shortcuts

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