controller

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Sources   []source.Source
	Providers []provider.Provider
	// The interval between individual synchronizations
	Interval time.Duration
	// Logger instance
	Logger *zap.Logger
	// contains filtered or unexported fields
}

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

Run runs RunOnce in a loop with a delay until context is canceled.

func (*Controller) RunOnce

func (c *Controller) RunOnce(ctx context.Context) error

RunOnce runs a single iteration of a reconciliation loop.

func (*Controller) ScheduleRunOnce

func (c *Controller) ScheduleRunOnce(now time.Time)

ScheduleRunOnce makes sure execution happens at most once per interval.

func (*Controller) ShouldRunOnce

func (c *Controller) ShouldRunOnce(now time.Time) bool

Jump to

Keyboard shortcuts

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