trigger

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartTrigger

func StartTrigger(ctx context.Context, t Trigger) (<-chan bool, error)

StartTrigger attempts to start a trigger. It will attempt to start as a polling trigger if it tried unsuccessfully to start a notify trigger.

Types

type Config

type Config interface {
	Trigger() string
	Artifacts() []*latest.Artifact
	WatchPollInterval() int
}

type Trigger

type Trigger interface {
	Start(context.Context) (<-chan bool, error)
	LogWatchToUser(io.Writer)
	Debounce() bool
}

Trigger describes a mechanism that triggers the watch.

func NewTrigger

func NewTrigger(cfg Config, isActive func() bool) (Trigger, error)

NewTrigger creates a new trigger.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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