trigger

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 1

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 added in v1.7.1

type Config interface {
	Trigger() string
	Artifacts() []*latestV1.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