event

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package event contains all event emitters supported by this package.

Index

Constants

This section is empty.

Variables

View Source
var CronParser = cron.NewParser(cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)

Functions

This section is empty.

Types

type Cron

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

func NewCron

func NewCron(schedule string, c *cron.Cron, logger *logrus.Entry) Cron

func (*Cron) BuildTickChannel

func (c *Cron) BuildTickChannel() <-chan any

BuildTickChannel implements abstraction.Scheduler.

func (*Cron) Run

func (c *Cron) Run()

type DockerEvent added in v0.6.0

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

func NewDockerEvent added in v0.6.0

func NewDockerEvent(
	connection string,
	containerMatcher string,
	imageMatcher string,
	actions []string,
	labels map[string]string,
	errorLimit uint,
	errorPolicy ErrorLimitPolicy,
	errorThrottle time.Duration,
	logger *logrus.Entry,
) *DockerEvent

func (*DockerEvent) BuildTickChannel added in v0.6.0

func (de *DockerEvent) BuildTickChannel() <-chan any

BuildTickChannel implements abstraction.Scheduler.

type ErrorLimitPolicy added in v0.6.0

type ErrorLimitPolicy string
const (
	Kill      ErrorLimitPolicy = "kill"
	GiveUp    ErrorLimitPolicy = "give-up"
	Reconnect ErrorLimitPolicy = "reconnect"
)

type Init

type Init struct{}

func (*Init) BuildTickChannel

func (c *Init) BuildTickChannel() <-chan any

BuildTickChannel implements abstraction.Scheduler.

type Interval

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

func NewInterval

func NewInterval(schedule time.Duration, logger *logrus.Entry) Interval

func (*Interval) BuildTickChannel

func (c *Interval) BuildTickChannel() <-chan any

BuildTickChannel implements abstraction.Scheduler.

type WebEventListener

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

func NewEventListener

func NewEventListener(event string) WebEventListener

func (*WebEventListener) BuildTickChannel

func (w *WebEventListener) BuildTickChannel() <-chan any

BuildTickChannel implements abstraction.Scheduler.

Jump to

Keyboard shortcuts

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